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

Update lineinfile.py (#44976)

* Update lineinfile.py

The document should call out in the regexp section what regexp does in non-match scenario, not just leave it for the reader to find it under `insertbefore` and `insertafter`.  
+label: docsite_pr

* Update lineinfile.py

fixing for lint

* Use multiple entries
This commit is contained in:
Dan Farrell 2018-09-01 22:18:33 -05:00 committed by Dag Wieers
parent 93cd050250
commit 667f62c5a8

View file

@ -40,13 +40,15 @@ options:
aliases: [ dest, destfile, name ] aliases: [ dest, destfile, name ]
required: true required: true
regexp: regexp:
aliases: [ 'regex' ] aliases: [ regex ]
description: description:
- The regular expression to look for in every line of the file. For - The regular expression to look for in every line of the file.
C(state=present), the pattern to replace if found. Only the last line - For C(state=present), the pattern to replace if found. Only the last line found will be replaced.
found will be replaced. For C(state=absent), the pattern of the line(s) - For C(state=absent), the pattern of the line(s) to remove.
to remove. Uses Python regular expressions. - If the regular expression is not matched, the line will be
See U(http://docs.python.org/2/library/re.html). added to the file in keeping with`insertbefore` or `insertafter`
settings.
- Uses Python regular expressions. See U(http://docs.python.org/2/library/re.html).
version_added: '1.7' version_added: '1.7'
state: state:
description: description: