Debian Codegraph @

test/integration/targets/var_templating/test_connection_vars.yml

raw
1 ---
2 - hosts: localhost
3 gather_facts: no
4 vars:
5 my_var:
6 become_method: sudo
7 connection: local
8 become: 1
9 tasks:
10
11 - include_vars: "./vars/connection.yml"
12
13 - command: whoami
14 ignore_errors: yes
15 register: result
16 failed_when: result is not success and (result.module_stderr is defined or result.module_stderr is defined)
17
18 - assert:
19 that:
20 - "'sudo' in result.module_stderr"
21 when: result is not success and result.module_stderr is defined
22
23 - assert:
24 that:
25 - "'Invalid become method specified' not in result.msg"
26 when: result is not success and result.msg is defined