1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

reformated test, changed big assert to with_items

much easier to see the individual condition that causes the failure
when using with_items and evaluating each part of the assert individually
This commit is contained in:
Brian Coca 2015-12-01 21:11:12 -08:00
parent a1e8050760
commit c03afccc05

View file

@ -1,6 +1,7 @@
--- ---
- hosts: testhost - hosts: testhost
vars: vars:
- ansible_hostname: "BAD!"
- vars_var: "vars_var" - vars_var: "vars_var"
- param_var: "BAD!" - param_var: "BAD!"
- vars_files_var: "BAD!" - vars_files_var: "BAD!"
@ -24,7 +25,8 @@
- debug: var=registered_var - debug: var=registered_var
- debug: var=from_inventory_once_removed - debug: var=from_inventory_once_removed
- assert: - assert:
that: that: item
with_items:
- 'extra_var == "extra_var"' - 'extra_var == "extra_var"'
- 'extra_var_override == "extra_var_override"' - 'extra_var_override == "extra_var_override"'
- 'extra_var_override_once_removed == "extra_var_override"' - 'extra_var_override_once_removed == "extra_var_override"'