diff --git a/lib/ansible/modules/system/systemd.py b/lib/ansible/modules/system/systemd.py index 87dd0a9e9b..a2d2d7d2ea 100644 --- a/lib/ansible/modules/system/systemd.py +++ b/lib/ansible/modules/system/systemd.py @@ -80,7 +80,8 @@ options: default: no version_added: "2.3" notes: - - Since 2.4, one of the following options is required 'state', 'enabled', 'masked', 'daemon_reload', and all except 'daemon_reload' also require 'name'. + - 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'. - Before 2.4 you always required 'name'. requirements: - A system managed by systemd. @@ -123,6 +124,10 @@ EXAMPLES = ''' - name: just force systemd to reread configs (2.4 and above) systemd: daemon_reload: yes + +- name: just force systemd to re-execute itself (2.8 and above) + systemd: + daemon_reexec: yes ''' RETURN = ''' @@ -325,7 +330,7 @@ def main(): no_block=dict(type='bool', default=False), ), supports_check_mode=True, - required_one_of=[['state', 'enabled', 'masked', 'daemon_reload']], + required_one_of=[['state', 'enabled', 'masked', 'daemon_reload', 'daemon_reexec']], required_by=dict( state=('name', ), enabled=('name', ),