You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/samples/test_become.yml

16 lines
304 B
YAML

- hosts: all
gather_facts: no
remote_user: root
roles:
- { role: test_become_r2 }
- { role: test_become_r2, sudo_user: testing }
tasks:
- command: whoami
- command: whoami
become_user: testing
- block:
- command: whoami
- block:
- command: whoami
become_user: testing