ansible/test/test_playbook_undefined_vars/playbook1.yml
Petr Svoboda e3adfbf5f8 Add tests for undefined variable detection
Tests `test_playbook_undefined_varsX_fail` check if ansible detects
undefined variables when `error_on_undefined_vars` is enabled. These
tests fail without "Improve behavior with error_on_undefined_vars
enabled" patch.

Tests `test_playbook_undefined_varsX_ignore` check if ansible ignores
undefined variables when `error_on_undefined_vars` is disabled.

Also modify PlayBook._run_task_internal() so error_on_undefined_vars is
testable.
2013-08-20 00:40:49 -05:00

7 lines
183 B
YAML

- hosts: all
vars:
playbook_var_good: "ok"
playbook_var_bad: "{{ undefined_var }}"
tasks:
- debug: msg="{{ playbook_var_good }}"
- debug: msg="{{ playbook_var_bad }}"