mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
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:
8
test/integration/targets/template/runme.sh
Executable file
8
test/integration/targets/template/runme.sh
Executable 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 }}"
|
||||
4
test/integration/targets/template/template.yml
Normal file
4
test/integration/targets/template/template.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- hosts: testhost
|
||||
gather_facts: yes
|
||||
roles:
|
||||
- { role: template }
|
||||
Reference in New Issue
Block a user