Add a validate example to blockinfile. (#32088)
(cherry picked from commit d2cb676c4c
)
This commit is contained in:
parent
d5df56d4fc
commit
52f58e4bbd
1 changed files with 2 additions and 1 deletions
|
@ -117,11 +117,12 @@ EXAMPLES = r"""
|
|||
address 192.0.2.23
|
||||
netmask 255.255.255.0
|
||||
|
||||
- name: insert/update configuration using a local file
|
||||
- name: insert/update configuration using a local file and validate it
|
||||
blockinfile:
|
||||
block: "{{ lookup('file', './local/ssh_config') }}"
|
||||
dest: "/etc/ssh/ssh_config"
|
||||
backup: yes
|
||||
validate: "/usr/sbin/sshd -T -f %s"
|
||||
|
||||
- name: insert/update HTML surrounded by custom markers after <body> line
|
||||
blockinfile:
|
||||
|
|
Loading…
Reference in a new issue