mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Add warning when using an empty regexp in lineinfile (#42013)
* Revert "Account for empty string regexp in lineinfile (#41451)"
This reverts commit 4b5b4a760c.
* Use context managers for interacting with files
* Store line and regexp parameters in a variable
* Add warning when regexp is an empty string
* Remove '=' from error messages
* Update warning message and add changelog
* Add tests
* Improve warning message
Offer an equivalent regexp that won't trigger the warning.
Update tests to match new warning.
* Add porting guide entry for lineinfile change
This commit is contained in:
committed by
Toshio Kuratomi
parent
b6f2aad600
commit
fb55038d75
2
changelogs/fragments/lineinfile-empty-regexp.yml
Normal file
2
changelogs/fragments/lineinfile-empty-regexp.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
minor_changes:
|
||||
- lineinfile - add warning when using an empty regexp (https://github.com/ansible/ansible/issues/29443)
|
||||
Reference in New Issue
Block a user