community.general/lib/ansible/modules/files
Sam Doran 4b5b4a760c
Account for empty string regexp in lineinfile (#41451)
* Use context managers for interacting with files

* Account for empty string as regexp

Rather than explicitly testing for None, also test for an empty string which will evaluate to False. An empty string regexp matches every line, which ends up replacing the incorrect line.

* Store line parameter in a variable

* Add tests
2018-06-25 17:57:05 -04:00
..
__init__.py package files 2016-12-08 11:22:22 -05:00
acl.py Add nomask option to the acl module (#39810) 2018-06-13 15:08:00 -04:00
archive.py archive: Add support for xz (#34110) 2018-01-22 07:33:07 -05:00
assemble.py Temporarily revert c119d54 2018-06-15 13:00:54 -07:00
blockinfile.py Temporarily revert c119d54 2018-06-15 13:00:54 -07:00
copy.py Fix #38745 - set user/group on temp file (#38748) 2018-05-23 15:45:43 -05:00
fetch.py Clean up module documentation (#36909) 2018-03-15 22:15:24 +01:00
file.py Fix file state=touch not returning diff information 2018-06-20 14:51:27 -07:00
find.py Optimize file handling in the find module (#38192) 2018-04-10 09:01:44 -07:00
ini_file.py doc: add name to tasks in ini_file module examples (#38888) 2018-05-30 02:02:48 +02:00
iso_extract.py Update metadata to 1.1 2017-08-15 23:12:08 -07:00
lineinfile.py Account for empty string regexp in lineinfile (#41451) 2018-06-25 17:57:05 -04:00
patch.py add state parameter to patch module (#33692) 2018-05-12 04:58:12 -04:00
replace.py Temporarily revert c119d54 2018-06-15 13:00:54 -07:00
stat.py removed Queen's english from documentation 2017-11-28 10:03:36 +10:00
synchronize.py Group logic detecting user, ensure rsync_opts is a list if omitted. Fixes #40483 2018-05-22 11:00:54 -04:00
tempfile.py tempfile: PEP8 compliancy, pylint and docs (#30859) 2017-10-30 00:51:19 +01:00
template.py update docs of template module (#40312) 2018-05-24 22:48:12 -05:00
unarchive.py Fix: wildcard excludes in unarchive with tar archives (#40935) 2018-06-22 08:28:14 -07:00
xattr.py Remove deprecated get_exception API 2018-02-05 23:39:56 -05:00
xml.py xml: Fix validate-modules issue (#40121) 2018-05-15 02:29:48 +02:00