summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/no_log/dynamic.yml
blob: 4a1123d57496310e0c04749972f206045414e5f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
- 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) }}"