mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add doc example for lineinfile without a regexp parameter
This commit is contained in:
parent
9ac91916c3
commit
aaa44f9151
1 changed files with 3 additions and 0 deletions
|
@ -131,6 +131,9 @@ EXAMPLES = r"""
|
||||||
|
|
||||||
- lineinfile: dest=/etc/services regexp="^# port for http" insertbefore="^www.*80/tcp" line="# port for http by default"
|
- lineinfile: dest=/etc/services regexp="^# port for http" insertbefore="^www.*80/tcp" line="# port for http by default"
|
||||||
|
|
||||||
|
# Add a line to a file if it does not exist, without passing regexp
|
||||||
|
- lineinfile: dest=/tmp/testfile line="192.168.1.99 foo.lab.net foo"
|
||||||
|
|
||||||
# Fully quoted because of the ': ' on the line. See the Gotchas in the YAML docs.
|
# Fully quoted because of the ': ' on the line. See the Gotchas in the YAML docs.
|
||||||
- lineinfile: "dest=/etc/sudoers state=present regexp='^%wheel' line='%wheel ALL=(ALL) NOPASSWD: ALL'"
|
- lineinfile: "dest=/etc/sudoers state=present regexp='^%wheel' line='%wheel ALL=(ALL) NOPASSWD: ALL'"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue