summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/module_tracebacks/traceback.yml
blob: b1f0b5164a885550e0141b9dcc5267a7f7578235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
- hosts: all
  gather_facts: no
  tasks:
    - name: intentionally fail module execution
      ping:
        data: crash
      ignore_errors: yes
      register: ping

- hosts: localhost
  gather_facts: no
  tasks:
    - name: verify exceptions were properly captured
      assert:
        that:
          - hostvars.testhost_local.ping is failed
          - "'boom' in hostvars.testhost_local.ping.exception"
          - "'boom' in hostvars.testhost_local.ping.module_stderr"
          - hostvars.testhost_ssh.ping is failed
          - "'boom' in hostvars.testhost_ssh.ping.exception"
          - "'boom' in hostvars.testhost_ssh.ping.module_stdout"