summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/module_tracebacks/traceback.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:21 +0000
commit8a754e0858d922e955e71b253c139e071ecec432 (patch)
tree527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/module_tracebacks/traceback.yml
parentInitial commit. (diff)
downloadansible-core-upstream.tar.xz
ansible-core-upstream.zip
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/targets/module_tracebacks/traceback.yml')
-rw-r--r--test/integration/targets/module_tracebacks/traceback.yml21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/integration/targets/module_tracebacks/traceback.yml b/test/integration/targets/module_tracebacks/traceback.yml
new file mode 100644
index 0000000..b1f0b51
--- /dev/null
+++ b/test/integration/targets/module_tracebacks/traceback.yml
@@ -0,0 +1,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"