mirror of https://github.com/ansible/ansible.git
find: Allow reading whole file for contains regex (#71083)
Change: - Add a parameter `read_whole_file` which allows for reading the whole file when doing a `contains` regex search. - This allows for (for example) matching a pattern at the very end of a file. Test Plan: - New integration tests Tickets: - Fixes #63378 Signed-off-by: Rick Elrod <rick@elrod.me>pull/71023/head
parent
5ca3aec3c4
commit
810a9a5593
@ -0,0 +1,2 @@
|
||||
minor_changes:
|
||||
- find module - Now has a ``read_whole_file`` boolean parameter which allows for reading the whole file and doing an ``re.search()`` regex evaluation on it when searching using the ``contains`` option. This allows (for example) for ensuring the very end of the file matches a pattern.
|
||||
@ -0,0 +1,2 @@
|
||||
this is a file that has
|
||||
a few lines in it
|
||||
@ -0,0 +1,4 @@
|
||||
01/01- OK
|
||||
01/02- OK
|
||||
01/03- KO
|
||||
01/04- OK
|
||||
Loading…
Reference in New Issue