1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/shadowed_module/runme.sh
Matt Martz f1082af73f
Error if a module is found to shadow a reserved keyword (#34649)
* Error if a module is found to shadow a reserved keyword

* Add test for shadowed module

* Bring in functools.wraps for the decorator

* Drop the decorator, make _find_plugin the real function, find_plugin now holds the shadow logic

* Swap order of functions for bottom to top execution order

* Only error for modules

* Add test for loading a lookup plugin that shadows a keyword
2018-04-10 09:26:27 -05:00

14 lines
474 B
Bash
Executable file

#!/usr/bin/env bash
set -ux
OUT=$(ansible-playbook playbook.yml -i inventory -e @../../integration_config.yml "$@" 2>&1 | grep 'ERROR! Module "tags" shadows the name of a reserved keyword.')
if [[ -z "$OUT" ]]; then
echo "Fake tags module did not cause error"
exit 1
fi
# This playbook calls a lookup which shadows a keyword.
# This is an ok situation, and should not error
ansible-playbook playbook_lookup.yml -i inventory -e @../../integration_config.yml "$@"