Debian Codegraph @

test/integration/targets/error_from_connection/play.yml

raw
1 - hosts: testhost
2 gather_facts: false
3 tasks:
4 - name: "use a connection plugin raising an exception, exception message contains Jinja template."
5 connection: dummy
6 command: /bin/true # command won't be executed
7 register: result
8 ignore_errors: True
9
10 - name: "check that Jinja template embedded in exception message isn't rendered"
11 debug:
12 msg: 'ok'
13 when: result is failed
14 register: debug_task
15
16 - assert:
17 that:
18 - result is failed
19 - "'an error with' in result.msg" # makes sure plugin was found
20 - debug_task is success