Check that AnsibleUndefinedVariable doesn't occur when an unused variable references an undefined variable (#35571)

* Check that AnsibleUndefinedVariable doesn't occur

* AnsibleUndefinedVariable exc.: don't modify type
This commit is contained in:
Pilou
2018-02-02 18:25:13 +01:00
committed by Toshio Kuratomi
parent c37b997abc
commit d608eb9530
3 changed files with 15 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -eux
ANSIBLE_ROLES_PATH=../ ansible-playbook template.yml -i ../../inventory -e @../../integration_config.yml -v "$@"
# Test for #35571
ansible testhost -i testhost, -m debug -a 'msg={{ hostvars["localhost"] }}' -e "vars1={{ undef }}" -e "vars2={{ vars1 }}"

View File

@@ -0,0 +1,4 @@
- hosts: testhost
gather_facts: yes
roles:
- { role: template }