mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Update mod_watch() description for all states.
This commit is contained in:
parent
bf3d0647fc
commit
a70358a1cc
9 changed files with 68 additions and 4 deletions
|
@ -292,6 +292,12 @@ def mod_watch(name, **kwargs):
|
|||
'''
|
||||
The at watcher, called to invoke the watch command.
|
||||
|
||||
.. note::
|
||||
This state exists to support special handling of the ``watch``
|
||||
:ref:`requisite <requisites>`. It should not be called directly.
|
||||
|
||||
Parameters for this function should be set by the state being triggered.
|
||||
|
||||
name
|
||||
The name of the atjob
|
||||
|
||||
|
|
|
@ -1233,6 +1233,12 @@ def wait_call(name,
|
|||
def mod_watch(name, **kwargs):
|
||||
'''
|
||||
Execute a cmd function based on a watch call
|
||||
|
||||
.. note::
|
||||
This state exists to support special handling of the ``watch``
|
||||
:ref:`requisite <requisites>`. It should not be called directly.
|
||||
|
||||
Parameters for this function should be set by the state being triggered.
|
||||
'''
|
||||
if kwargs['sfun'] in ('wait', 'run', 'watch'):
|
||||
if kwargs.get('stateful'):
|
||||
|
|
|
@ -2049,6 +2049,15 @@ def absent(name, force=False):
|
|||
|
||||
|
||||
def mod_watch(name, sfun=None, **kwargs):
|
||||
'''
|
||||
The docker_container watcher, called to invoke the watch command.
|
||||
|
||||
.. note::
|
||||
This state exists to support special handling of the ``watch``
|
||||
:ref:`requisite <requisites>`. It should not be called directly.
|
||||
|
||||
Parameters for this function should be set by the state being triggered.
|
||||
'''
|
||||
if sfun == 'running':
|
||||
watch_kwargs = copy.deepcopy(kwargs)
|
||||
if watch_kwargs.get('watch_action', 'force') == 'force':
|
||||
|
|
|
@ -411,6 +411,15 @@ def absent(name=None, images=None, force=False):
|
|||
|
||||
|
||||
def mod_watch(name, sfun=None, **kwargs):
|
||||
'''
|
||||
The docker_image watcher, called to invoke the watch command.
|
||||
|
||||
.. note::
|
||||
This state exists to support special handling of the ``watch``
|
||||
:ref:`requisite <requisites>`. It should not be called directly.
|
||||
|
||||
Parameters for this function should be set by the state being triggered.
|
||||
'''
|
||||
if sfun == 'present':
|
||||
# Force image to be updated
|
||||
kwargs['force'] = True
|
||||
|
|
|
@ -253,7 +253,14 @@ def wait_rm(name, recurse=False, profile=None):
|
|||
|
||||
def mod_watch(name, **kwargs):
|
||||
'''
|
||||
Execute a etcd function based on a watch call requisite.
|
||||
The etcd watcher, called to invoke the watch command.
|
||||
When called, execute a etcd function based on a watch call requisite.
|
||||
|
||||
.. note::
|
||||
This state exists to support special handling of the ``watch``
|
||||
:ref:`requisite <requisites>`. It should not be called directly.
|
||||
|
||||
Parameters for this function should be set by the state being triggered.
|
||||
'''
|
||||
|
||||
# Watch to set etcd key
|
||||
|
|
|
@ -808,6 +808,12 @@ def mod_watch(name, user=None, **kwargs):
|
|||
'''
|
||||
The mounted watcher, called to invoke the watch command.
|
||||
|
||||
.. note::
|
||||
This state exists to support special handling of the ``watch``
|
||||
:ref:`requisite <requisites>`. It should not be called directly.
|
||||
|
||||
Parameters for this function should be set by the state being triggered.
|
||||
|
||||
name
|
||||
The name of the mount point
|
||||
|
||||
|
|
|
@ -3186,6 +3186,12 @@ def mod_aggregate(low, chunks, running):
|
|||
def mod_watch(name, **kwargs):
|
||||
'''
|
||||
Install/reinstall a package based on a watch requisite
|
||||
|
||||
.. note::
|
||||
This state exists to support special handling of the ``watch``
|
||||
:ref:`requisite <requisites>`. It should not be called directly.
|
||||
|
||||
Parameters for this function should be set by the state being triggered.
|
||||
'''
|
||||
sfun = kwargs.pop('sfun', None)
|
||||
mapfun = {'purged': purged,
|
||||
|
|
|
@ -361,7 +361,16 @@ def mod_watch(name,
|
|||
conf_file=None,
|
||||
bin_env=None,
|
||||
**kwargs):
|
||||
# Always restart on watch
|
||||
'''
|
||||
The supervisord watcher, called to invoke the watch command.
|
||||
Always restart on watch
|
||||
|
||||
.. note::
|
||||
This state exists to support special handling of the ``watch``
|
||||
:ref:`requisite <requisites>`. It should not be called directly.
|
||||
|
||||
Parameters for this function should be set by the state being triggered.
|
||||
'''
|
||||
return running(
|
||||
name,
|
||||
restart=restart,
|
||||
|
|
|
@ -270,8 +270,14 @@ def wait(name, url='http://localhost:8080/manager', timeout=180):
|
|||
|
||||
def mod_watch(name, url='http://localhost:8080/manager', timeout=180):
|
||||
'''
|
||||
The tomcat watcher function.
|
||||
When called it will reload the webapp in question
|
||||
The tomcat watcher, called to invoke the watch command.
|
||||
When called, it will reload the webapp in question
|
||||
|
||||
.. note::
|
||||
This state exists to support special handling of the ``watch``
|
||||
:ref:`requisite <requisites>`. It should not be called directly.
|
||||
|
||||
Parameters for this function should be set by the state being triggered.
|
||||
'''
|
||||
|
||||
msg = __salt__['tomcat.reload'](name, url, timeout)
|
||||
|
|
Loading…
Add table
Reference in a new issue