ansible/test
Brian Coca 089d0a0508
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>
2021-03-19 13:18:31 -04:00
..
ansible_test
integration find - set proper default based on use_regex (#73961) 2021-03-19 13:18:31 -04:00
lib/ansible_test fix typo 2021-03-18 12:50:06 -07:00
sanity module output is only json objects (#73765) 2021-03-03 15:11:18 -05:00
support module compat for py3.8+ controller (#73423) 2021-02-10 21:32:59 -08:00
units Amazon: Fix distribution facts for older release 2021-03-18 12:42:04 -07:00
utils/shippable module compat for py3.8+ controller (#73423) 2021-02-10 21:32:59 -08:00