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:
parent
bc95720780
commit
cd8f8d7a3e
1 changed files with 7 additions and 2 deletions
|
@ -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', ),
|
||||
|
|
Loading…
Reference in a new issue