mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
plugin_filter: check for type error (#46664)
* Parsing plugin filter may raise TypeError, gracefully handle this exception and let user know about the syntax error in plugin filter file. * Test for plugin_filtering Fixes: #46658 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
[defaults]
|
||||
retry_files_enabled = False
|
||||
plugin_filters_cfg = ./no_blacklist_module.yml
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
filter_version: 1.0
|
||||
module_blacklist:
|
||||
@@ -21,6 +21,15 @@ if test $? != 0 ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Check that if no modules are blacklisted then Ansible should not through traceback
|
||||
#
|
||||
ANSIBLE_CONFIG=no_blacklist_module.ini ansible-playbook tempfile.yml -i ../../inventory -vvv "$@"
|
||||
if test $? != 0 ; then
|
||||
echo "### Failed to run tempfile with no modules blacklisted"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Check that with these modules filtered out, all of these modules fail to be found
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user