1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/no_log/dynamic.yml
Brian Coca bda074d34e
fix tempating issues with no_log and loops (#44468)
* fix tempating issues with no_log and loops

 - task is no log if any item is
 - added test cases

fixes #43294
2018-08-21 21:53:56 -04:00

27 lines
649 B
YAML

- name: test dynamic no log
hosts: testhost
gather_facts: no
ignore_errors: yes
tasks:
- name: no loop, task fails, dynamic no_log
debug:
msg: "SHOW {{ var_does_not_exist }}"
no_log: "{{ not (unsafe_show_logs|bool) }}"
- name: loop, task succeeds, dynamic does no_log
debug:
msg: "SHOW {{ item }}"
loop:
- a
- b
- c
no_log: "{{ not (unsafe_show_logs|bool) }}"
- name: loop, task fails, dynamic no_log
debug:
msg: "SHOW {{ var_does_not_exist }}"
loop:
- a
- b
- c
no_log: "{{ not (unsafe_show_logs|bool) }}"