summaryrefslogtreecommitdiff
path: root/changelogs
diff options
context:
space:
mode:
authorSam Doran <sdoran@redhat.com>2018-07-05 12:41:07 -0400
committerMatt Davis <nitzmahone@users.noreply.github.com>2018-07-05 09:41:07 -0700
commit0fa56ed65d4dba2cf4050a0448dc63938e3572e7 (patch)
treec2b01e08050b5fcf8a78621049f51db0b1e6afdd /changelogs
parenteef9d0bf0486ef614da41344b2d412f02b894936 (diff)
downloadansible-0fa56ed65d4dba2cf4050a0448dc63938e3572e7.tar.gz
Add warning when using an empty regexp in lineinfile (#42013) (#42207)
* Revert "Account for empty string regexp in lineinfile (#41451)" This reverts commit 4b5b4a760c5217bdfd1d45efd224e2762e9898b0. * 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 (cherry picked from commit fb55038d7516149aecd9a617572437b8c2c13f50)
Diffstat (limited to 'changelogs')
-rw-r--r--changelogs/fragments/lineinfile-empty-regexp.yml2
1 files changed, 2 insertions, 0 deletions
diff --git a/changelogs/fragments/lineinfile-empty-regexp.yml b/changelogs/fragments/lineinfile-empty-regexp.yml
new file mode 100644
index 0000000000..8ea3a3a5f8
--- /dev/null
+++ b/changelogs/fragments/lineinfile-empty-regexp.yml
@@ -0,0 +1,2 @@
+minor_changes:
+ - lineinfile - add warning when using an empty regexp (https://github.com/ansible/ansible/issues/29443)