mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
649 B
YAML
28 lines
649 B
YAML
6 years ago
|
- 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) }}"
|