f109184753
Module tracebacks may be reported on stdout instead of stderr when using some connection plugins. For example, the ssh connection plugin will report tracebacks on stdout due to use of the -tt option. This change results in tracebacks being recognized on both stdout and stderr, instead of the previous behavior of just stderr. ci_complete
21 lines
652 B
YAML
21 lines
652 B
YAML
- 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"
|