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:
parent
93cd050250
commit
667f62c5a8
1 changed files with 8 additions and 6 deletions
|
@ -40,13 +40,15 @@ options:
|
|||
aliases: [ dest, destfile, name ]
|
||||
required: true
|
||||
regexp:
|
||||
aliases: [ 'regex' ]
|
||||
aliases: [ regex ]
|
||||
description:
|
||||
- The regular expression to look for in every line of the file. For
|
||||
C(state=present), the pattern to replace if found. Only the last line
|
||||
found will be replaced. For C(state=absent), the pattern of the line(s)
|
||||
to remove. Uses Python regular expressions.
|
||||
See U(http://docs.python.org/2/library/re.html).
|
||||
- The regular expression to look for in every line of the file.
|
||||
- For C(state=present), the pattern to replace if found. Only the last line found will be replaced.
|
||||
- For C(state=absent), the pattern of the line(s) to remove.
|
||||
- If the regular expression is not matched, the line will be
|
||||
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'
|
||||
state:
|
||||
description:
|
||||
|
|
Loading…
Reference in a new issue