ansible/test/integration/targets/collections
Rick Elrod cace616aab
Filter BLACKLIST_EXTS in PluginLoader (#69029)
Change:
Rather than hardcoding .pyo and .pyc, filter on all BLACKLIST_EXTS in
the non-legacy logic of PluginLoader (_find_fq_plugin). The two harcoded
extensions are part of BLACKLIST_EXTS already and this simply adds the
rest of the blacklisted extensions to the check.

In addition, check .endswith() instead of an exact match of the suffix,
like everywhere else that uses BLACKLIST_EXTS. This allows for
blacklisting, for example, emacs's backup files which can appear after
any extension, leading to things like `foo.py~`.

Test Plan:
Ran `ansible-playbook` against a collection where a `foo.py~` module was
getting executed instead of `foo.py` which also appeared in the same
directory. `foo.py~` is no longer executed.

Tickets:
Fixes #22268
Refs #27235

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-04-22 17:20:12 -05:00
..
collection_root_sys/ansible_collections/testns Add missing boilerplate to collections test. (#60507) 2019-08-13 12:20:14 -07:00
collection_root_user/ansible_collections Filter BLACKLIST_EXTS in PluginLoader (#69029) 2020-04-22 17:20:12 -05:00
collections/ansible_collections fix using inventory and cache plugins in a collection (#56469) 2020-03-26 12:05:46 -04:00
custom_vars_plugins Support vars plugins in collections (#61078) 2019-11-04 11:41:14 -05:00
inventory_cache fix using inventory and cache plugins in a collection (#56469) 2020-03-26 12:05:46 -04:00
library Add missing boilerplate to collections test. (#60507) 2019-08-13 12:20:14 -07:00
roles Allow a collection role to call a standalone role by default (#69102) 2020-04-22 13:58:08 -05:00
a.statichost.yml
aliases Address compat issue for collection loading on py26 (#68219) 2020-03-23 11:14:21 -05:00
cache.statichost.yml fix using inventory and cache plugins in a collection (#56469) 2020-03-26 12:05:46 -04:00
check_populated_inventory.yml fix using inventory and cache plugins in a collection (#56469) 2020-03-26 12:05:46 -04:00
includeme.yml
invocation_tests.yml Action module xross coll (#68080) 2020-03-25 11:57:53 -04:00
posix.yml Allow a collection role to call a standalone role by default (#69102) 2020-04-22 13:58:08 -05:00
runme.sh fix using inventory and cache plugins in a collection (#56469) 2020-03-26 12:05:46 -04:00
vars_plugin_tests.sh Inventory CLI - Ignore settings for when vars plugins should run (#65073) 2019-11-25 13:16:03 -05:00
windows.yml Change collection PS util import pattern (#61307) 2019-08-27 16:02:27 -07:00