2019-05-23 15:42:19 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# this should succeed since we override the undefined variable
|
|
|
|
ansible-playbook undefined.yml -i inventory -v "$@" -e '{"mytest": False}'
|
|
|
|
|
|
|
|
# this should still work, just show that var is undefined in debug
|
|
|
|
ansible-playbook undefined.yml -i inventory -v "$@"
|
|
|
|
|
|
|
|
# this should work since we dont use the variable
|
|
|
|
ansible-playbook undall.yml -i inventory -v "$@"
|
2019-11-01 20:51:34 +01:00
|
|
|
|
|
|
|
# test hostvars templating
|
|
|
|
ansible-playbook task_vars_templating.yml -v "$@"
|
2020-07-16 17:21:39 +02:00
|
|
|
|
2020-07-28 19:02:43 +02:00
|
|
|
# there should be an attempt to use 'sudo' in the connection debug output
|
|
|
|
ANSIBLE_BECOME_ALLOW_SAME_USER=true ansible-playbook test_connection_vars.yml -vvvv "$@" | tee /dev/stderr | grep 'sudo \-H \-S'
|