|
|
@ -83,6 +83,7 @@ notes:
|
|
|
|
- Since 2.4, one of the following options is required 'state', 'enabled', 'masked', 'daemon_reload', ('daemon_reexec' since 2.8),
|
|
|
|
- Since 2.4, one of the following options is required 'state', 'enabled', 'masked', 'daemon_reload', ('daemon_reexec' since 2.8),
|
|
|
|
and all except 'daemon_reload' (and 'daemon_reexec' since 2.8) also require 'name'.
|
|
|
|
and all except 'daemon_reload' (and 'daemon_reexec' since 2.8) also require 'name'.
|
|
|
|
- Before 2.4 you always required 'name'.
|
|
|
|
- Before 2.4 you always required 'name'.
|
|
|
|
|
|
|
|
- Globs are not supported in name, i.e ``postgres*.service``.
|
|
|
|
requirements:
|
|
|
|
requirements:
|
|
|
|
- A system managed by systemd.
|
|
|
|
- A system managed by systemd.
|
|
|
|
'''
|
|
|
|
'''
|
|
|
@ -339,6 +340,11 @@ def main():
|
|
|
|
mutually_exclusive=[['scope', 'user']],
|
|
|
|
mutually_exclusive=[['scope', 'user']],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unit = module.params['name']
|
|
|
|
|
|
|
|
for globpattern in (r"*", r"?", r"["):
|
|
|
|
|
|
|
|
if globpattern in unit:
|
|
|
|
|
|
|
|
module.fail_json(msg="This module does not currently support using glob patterns, found '%s' in service name: %s" % (globpattern, unit))
|
|
|
|
|
|
|
|
|
|
|
|
systemctl = module.get_bin_path('systemctl', True)
|
|
|
|
systemctl = module.get_bin_path('systemctl', True)
|
|
|
|
|
|
|
|
|
|
|
|
if os.getenv('XDG_RUNTIME_DIR') is None:
|
|
|
|
if os.getenv('XDG_RUNTIME_DIR') is None:
|
|
|
@ -364,7 +370,6 @@ def main():
|
|
|
|
if module.params['force']:
|
|
|
|
if module.params['force']:
|
|
|
|
systemctl += " --force"
|
|
|
|
systemctl += " --force"
|
|
|
|
|
|
|
|
|
|
|
|
unit = module.params['name']
|
|
|
|
|
|
|
|
rc = 0
|
|
|
|
rc = 0
|
|
|
|
out = err = ''
|
|
|
|
out = err = ''
|
|
|
|
result = dict(
|
|
|
|
result = dict(
|
|
|
|