mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
commit
46d2a28867
@ -82,6 +82,8 @@ def start(name='all', user=None, conf_file=None, bin_env=None):
|
||||
salt '*' supervisord.start <service>
|
||||
salt '*' supervisord.start <group>:
|
||||
'''
|
||||
if name.endswith(':*'):
|
||||
name = name[:-1]
|
||||
ret = __salt__['cmd.run_all'](
|
||||
_ctl_cmd('start', name, conf_file, bin_env), runas=user
|
||||
)
|
||||
@ -108,6 +110,8 @@ def restart(name='all', user=None, conf_file=None, bin_env=None):
|
||||
salt '*' supervisord.restart <service>
|
||||
salt '*' supervisord.restart <group>:
|
||||
'''
|
||||
if name.endswith(':*'):
|
||||
name = name[:-1]
|
||||
ret = __salt__['cmd.run_all'](
|
||||
_ctl_cmd('restart', name, conf_file, bin_env), runas=user
|
||||
)
|
||||
@ -134,6 +138,8 @@ def stop(name='all', user=None, conf_file=None, bin_env=None):
|
||||
salt '*' supervisord.stop <service>
|
||||
salt '*' supervisord.stop <group>:
|
||||
'''
|
||||
if name.endswith(':*'):
|
||||
name = name[:-1]
|
||||
ret = __salt__['cmd.run_all'](
|
||||
_ctl_cmd('stop', name, conf_file, bin_env), runas=user
|
||||
)
|
||||
@ -160,6 +166,8 @@ def add(name, user=None, conf_file=None, bin_env=None):
|
||||
'''
|
||||
if name.endswith(':'):
|
||||
name = name[:-1]
|
||||
elif name.endswith(':*'):
|
||||
name = name[:-2]
|
||||
ret = __salt__['cmd.run_all'](
|
||||
_ctl_cmd('add', name, conf_file, bin_env), runas=user
|
||||
)
|
||||
@ -186,6 +194,8 @@ def remove(name, user=None, conf_file=None, bin_env=None):
|
||||
'''
|
||||
if name.endswith(':'):
|
||||
name = name[:-1]
|
||||
elif name.endswith(':*'):
|
||||
name = name[:-2]
|
||||
ret = __salt__['cmd.run_all'](
|
||||
_ctl_cmd('remove', name, conf_file, bin_env), runas=user
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user