You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test
Sam Doran 0d668b6046
[stable-2.9] find - set proper default based on use_regex (#73961) (#73966)
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>.
(cherry picked from commit 089d0a0508)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>

* Update fix_find_default.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
5 years ago
..
ansible_test Relocate ansible-test self tests outside package. (#61255) 6 years ago
integration [stable-2.9] find - set proper default based on use_regex (#73961) (#73966) 5 years ago
legacy Rename Azure modules: facts -> info (#61505) 6 years ago
lib/ansible_test [stable-2.9] Fix ansible-test coverage exporting. 5 years ago
sanity [security] Add more missing no_logs (#74115) 5 years ago
units [stable-2.9] Add AlmaLinux to the family of Red Hat-like operating systems (#73541) (#73544) 5 years ago
utils [stable-2.9] Azure Pipelines configuration. 5 years ago