mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
bda074d34e
* fix tempating issues with no_log and loops - task is no log if any item is - added test cases fixes #43294
27 lines
649 B
YAML
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) }}"
|