Debian Codegraph @

test/integration/targets/omit/75692.yml

raw
1 - name: omit should reset to 'absent' or same context, not just 'default' value
2 hosts: testhost
3 gather_facts: false
4 become: yes
5 # become_user needed at play level for testing this behavior
6 become_user: nobody
7 roles:
8 - name: setup_test_user
9 become_user: root
10 tasks:
11 - shell: whoami
12 register: inherited
13
14 - shell: whoami
15 register: explicit_no
16 become: false
17
18 - shell: whoami
19 register: omited_inheritance
20 become: '{{ omit }}'
21
22 - shell: whoami
23 register: explicit_yes
24 become: yes
25
26 - name: ensure omit works with inheritance
27 assert:
28 that:
29 - inherited.stdout == omited_inheritance.stdout
30 - inherited.stdout == explicit_yes.stdout
31 - inherited.stdout != explicit_no.stdout