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/integration/targets/module_precedence
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>
5 years ago
..
lib_no_extension metadata 1.1 7 years ago
lib_with_extension Filter BLACKLIST_EXTS in PluginLoader (#69029) 5 years ago
multiple_roles
roles_no_extension/foo
roles_with_extension/foo Filter BLACKLIST_EXTS in PluginLoader (#69029) 5 years ago
aliases
modules_test.yml More test fixes for split controller/remote tests. 6 years ago
modules_test_envvar.yml More test fixes for split controller/remote tests. 6 years ago
modules_test_envvar_ext.yml Filter BLACKLIST_EXTS in PluginLoader (#69029) 5 years ago
modules_test_multiple_roles.yml More test fixes for split controller/remote tests. 6 years ago
modules_test_multiple_roles_reverse_order.yml More test fixes for split controller/remote tests. 6 years ago
modules_test_role.yml More test fixes for split controller/remote tests. 6 years ago
modules_test_role_ext.yml Filter BLACKLIST_EXTS in PluginLoader (#69029) 5 years ago
runme.sh Filter BLACKLIST_EXTS in PluginLoader (#69029) 5 years ago