1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

systemd: Allow standalone 'daemon_reexec' option without using 'name' (#54424)

This commit is contained in:
Indrajit Raychaudhuri 2019-03-26 19:50:25 -05:00 committed by Brian Coca
parent bc95720780
commit cd8f8d7a3e

View file

@ -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', ),