1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/lineinfile
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
..
files Check for regexp match when using insertbefore or insertafter (#36474) 2018-02-21 17:03:38 -05:00
meta Migrate Linux CI roles to test targets. (#17997) 2016-10-13 09:09:25 -07:00
tasks Account for empty string regexp in lineinfile (#41451) 2018-06-25 17:57:05 -04:00
vars Check for regexp match when using insertbefore or insertafter (#36474) 2018-02-21 17:03:38 -05:00
aliases Initial ansible-test implementation. (#18556) 2016-11-29 21:21:53 -08:00