mirror of https://github.com/ansible/ansible.git
find - set proper default based on use_regex (#73961)
When using "use_regex: yes" and setting an excludes: without specifying a pattern: the existing code passes the file-glob '*' to the regex matcher. This results in an internal invalid-regex exception being thrown. This maintains the old semantics of a default match-all for pattern: but switches the default to '.*' when use_regex is specified. The code made sense as-is before excludes: was added (2.5). In that case, it made no sense to set use_regex but *not* set a pattern. However, with excludes: it now makes sense to only want to exclude a given regex but not specify a specific matching pattern. Closes: #50067 * moved change to new location added changelog * Update lib/ansible/modules/find.py Co-authored-by: Ian Wienand <iwienand@redhat.com>pull/73979/head
parent
48c0fbd1cb
commit
089d0a0508
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- find module, fix default pattern when use_regex is true.
|
Loading…
Reference in New Issue