Debian Codegraph @

test/integration/targets/callback_results/connection_name.yml

raw
1 - hosts: testhost
2 gather_facts: no
3 vars:
4 ansible_connection: '{{ "ansible.legacy.local" }}' # use a templated value with the non-canonical name of the connection; this should resolve to `ansible.builtin.local`
5 name: validate that task.connection is always overwritten with the templated and resolved name of the connection
6 tasks:
7 - name: execute a successful non-loop task with the local connection
8 raw: echo hi
9
10 - name: execute a failing non-loop task with the local connection
11 raw: exit 1
12 ignore_errors: true
13
14 - name: execute a successful looped task with the local connection
15 raw: echo hi {{ item }}
16 loop: [1]
17
18 - name: execute a failing looped task with the local connection
19 raw: echo hi {{ item }}; exit 1
20 ignore_errors: true
21 loop: [1]
22
23 - name: execute a successful async task with the local connection
24 command: echo hi
25 async: 5
26 poll: 1
27
28 - name: execute a failing async task with the local connection
29 command: exit 1
30 async: 5
31 poll: 1
32
33 - name: execute a looped async task with the local connection
34 command: echo hi {{ item }}
35 async: 5
36 poll: 1
37 loop: [1]