Debian Codegraph @

test/integration/targets/playbook/user.yml

raw
1 - hosts: localhost
2 tasks:
3 - command: whoami
4 register: whoami
5
6 - assert:
7 that:
8 - whoami is successful
9
10 - set_fact:
11 me: "{{ whoami.stdout }}"
12
13 - hosts: localhost
14 user: "{{ me }}"
15 tasks:
16 - debug:
17 msg: worked with user ({{ me }})
18
19 - hosts: localhost
20 remote_user: "{{ me }}"
21 tasks:
22 - debug:
23 msg: worked with remote_user ({{ me }})