|
|
@ -48,6 +48,13 @@ options:
|
|
|
|
type: bool
|
|
|
|
type: bool
|
|
|
|
default: 'no'
|
|
|
|
default: 'no'
|
|
|
|
aliases: [ daemon-reload ]
|
|
|
|
aliases: [ daemon-reload ]
|
|
|
|
|
|
|
|
daemon_reexec:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- run daemon_reexec command before doing any other operations, the systemd manager will serialize the manager state.
|
|
|
|
|
|
|
|
type: bool
|
|
|
|
|
|
|
|
default: 'no'
|
|
|
|
|
|
|
|
aliases: [ daemon-reexec ]
|
|
|
|
|
|
|
|
version_added: "2.8"
|
|
|
|
user:
|
|
|
|
user:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- (deprecated) run ``systemctl`` talking to the service manager of the calling user, rather than the service manager
|
|
|
|
- (deprecated) run ``systemctl`` talking to the service manager of the calling user, rather than the service manager
|
|
|
@ -306,6 +313,7 @@ def main():
|
|
|
|
force=dict(type='bool'),
|
|
|
|
force=dict(type='bool'),
|
|
|
|
masked=dict(type='bool'),
|
|
|
|
masked=dict(type='bool'),
|
|
|
|
daemon_reload=dict(type='bool', default=False, aliases=['daemon-reload']),
|
|
|
|
daemon_reload=dict(type='bool', default=False, aliases=['daemon-reload']),
|
|
|
|
|
|
|
|
daemon_reexec=dict(type='bool', default=False, aliases=['daemon-reexec']),
|
|
|
|
user=dict(type='bool'),
|
|
|
|
user=dict(type='bool'),
|
|
|
|
scope=dict(type='str', choices=['system', 'user', 'global']),
|
|
|
|
scope=dict(type='str', choices=['system', 'user', 'global']),
|
|
|
|
no_block=dict(type='bool', default=False),
|
|
|
|
no_block=dict(type='bool', default=False),
|
|
|
@ -356,6 +364,12 @@ def main():
|
|
|
|
if rc != 0:
|
|
|
|
if rc != 0:
|
|
|
|
module.fail_json(msg='failure %d during daemon-reload: %s' % (rc, err))
|
|
|
|
module.fail_json(msg='failure %d during daemon-reload: %s' % (rc, err))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Run daemon-reexec
|
|
|
|
|
|
|
|
if module.params['daemon_reexec'] and not module.check_mode:
|
|
|
|
|
|
|
|
(rc, out, err) = module.run_command("%s daemon-reexec" % (systemctl))
|
|
|
|
|
|
|
|
if rc != 0:
|
|
|
|
|
|
|
|
module.fail_json(msg='failure %d during daemon-reexec: %s' % (rc, err))
|
|
|
|
|
|
|
|
|
|
|
|
if unit:
|
|
|
|
if unit:
|
|
|
|
found = False
|
|
|
|
found = False
|
|
|
|
is_initd = sysv_exists(unit)
|
|
|
|
is_initd = sysv_exists(unit)
|
|
|
|