diff options
author | David Shrewsbury <Shrews@users.noreply.github.com> | 2021-06-14 15:44:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-14 14:44:24 -0500 |
commit | f752c7f179e3090d794ec09d4d6c544548897c4b (patch) | |
tree | 624500cea780bb95bf40cee5946ded53da88a2f6 /test/integration/targets/roles_arg_spec | |
parent | dce10b89ad9fe3f4d0f6be4c521fe7239f552e33 (diff) | |
download | ansible-f752c7f179e3090d794ec09d4d6c544548897c4b.tar.gz |
role argspec - tag role argspec validation task with 'always' (#74994) (#74996)
* update tag docs
(cherry picked from commit 97acb0f470471c9dcf1e357f1672127f146240a8)
Diffstat (limited to 'test/integration/targets/roles_arg_spec')
-rwxr-xr-x | test/integration/targets/roles_arg_spec/runme.sh | 5 | ||||
-rw-r--r-- | test/integration/targets/roles_arg_spec/test_tags.yml | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/integration/targets/roles_arg_spec/runme.sh b/test/integration/targets/roles_arg_spec/runme.sh index 680d9dd986..209a34e3e0 100755 --- a/test/integration/targets/roles_arg_spec/runme.sh +++ b/test/integration/targets/roles_arg_spec/runme.sh @@ -25,3 +25,8 @@ set +e ansible-playbook test_play_level_role_fails.yml -i ../../inventory "$@" test $? -ne 0 set -e + +# Test the validation task is tagged with 'always' by specifying an unused tag. +# The task is tagged with 'foo' but we use 'bar' in the call below and expect +# the validation task to run anyway since it is tagged 'always'. +ansible-playbook test_tags.yml -i ../../inventory "$@" --tags bar | grep "a : Validating arguments against arg spec 'main' - Main entry point for role A." diff --git a/test/integration/targets/roles_arg_spec/test_tags.yml b/test/integration/targets/roles_arg_spec/test_tags.yml new file mode 100644 index 0000000000..b4ea188bd1 --- /dev/null +++ b/test/integration/targets/roles_arg_spec/test_tags.yml @@ -0,0 +1,11 @@ +--- +- hosts: localhost + gather_facts: false + tasks: + - name: "Tag test #1" + import_role: + name: a + vars: + a_str: "tag test #1" + tags: + - foo |