Debian Codegraph @

ansible_collections/amazon/aws/tests/integration/targets/connection/test_assume.yml

raw
1 ---
2 - name: Ensure remote user exists
3 ansible.builtin.user:
4 name: "{{ user_name }}"
5 shell: /bin/bash
6 become: true
7 become_user: root
8
9 - name: Attempt to run a shell command as the user # noqa no-changed-when
10 ansible.builtin.command: id -u -n
11 become: true
12 become_user: "{{ user_name }}"
13 register: id_cmd
14
15 - name: Assert result matches user_name
16 ansible.builtin.assert:
17 that:
18 - id_cmd.stdout == user_name