diff options
author | Matt Clay <matt@mystile.com> | 2019-01-09 15:42:36 -0800 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2019-01-09 19:09:33 -0800 |
commit | dfc97dcefd90fa0bbb5af87402e11e6ed3162525 (patch) | |
tree | 3af1c7c0b599eb8fdeb0215886713ca69138b051 /test/integration/targets/meta_tasks | |
parent | 893548addbea1b63573d8f8d47665f2c8d27d496 (diff) | |
download | ansible-dfc97dcefd90fa0bbb5af87402e11e6ed3162525.tar.gz |
Move meta_tasks test inventory into test.
Diffstat (limited to 'test/integration/targets/meta_tasks')
-rw-r--r-- | test/integration/targets/meta_tasks/inventory | 3 | ||||
-rwxr-xr-x | test/integration/targets/meta_tasks/runme.sh | 4 | ||||
-rw-r--r-- | test/integration/targets/meta_tasks/test_end_host.yml | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/test/integration/targets/meta_tasks/inventory b/test/integration/targets/meta_tasks/inventory new file mode 100644 index 0000000000..470333e7ba --- /dev/null +++ b/test/integration/targets/meta_tasks/inventory @@ -0,0 +1,3 @@ +[local] +testhost ansible_connection=local host_var_role_name=role3 +testhost2 ansible_connection=local host_var_role_name=role2 diff --git a/test/integration/targets/meta_tasks/runme.sh b/test/integration/targets/meta_tasks/runme.sh index 1549b4c578..c9ddbfeb53 100755 --- a/test/integration/targets/meta_tasks/runme.sh +++ b/test/integration/targets/meta_tasks/runme.sh @@ -4,7 +4,7 @@ set -eux # test end_host meta task, with when conditional for test_strategy in linear free; do - out="$(ansible-playbook test_end_host.yml -i ../../inventory -e test_strategy=$test_strategy -vv "$@")" + out="$(ansible-playbook test_end_host.yml -i inventory -e test_strategy=$test_strategy -vv "$@")" grep -q "META: end_host conditional evaluated to false, continuing execution for testhost" <<< "$out" grep -q "META: ending play for testhost2" <<< "$out" @@ -14,7 +14,7 @@ done # test end_host meta task, on all hosts for test_strategy in linear free; do - out="$(ansible-playbook test_end_host_all.yml -i ../../inventory -e test_strategy=$test_strategy -vv "$@")" + out="$(ansible-playbook test_end_host_all.yml -i inventory -e test_strategy=$test_strategy -vv "$@")" grep -q "META: ending play for testhost" <<< "$out" grep -q "META: ending play for testhost2" <<< "$out" diff --git a/test/integration/targets/meta_tasks/test_end_host.yml b/test/integration/targets/meta_tasks/test_end_host.yml index 131d4d4e26..a8bb056272 100644 --- a/test/integration/targets/meta_tasks/test_end_host.yml +++ b/test/integration/targets/meta_tasks/test_end_host.yml @@ -8,7 +8,7 @@ - debug: - meta: end_host - when: "host_var_role_name == 'role2'" # end play for testhost2, see test/integration/inventory + when: "host_var_role_name == 'role2'" # end play for testhost2, see inventory - debug: msg: "play not ended for {{ inventory_hostname }}" |