Tutorial by Examples

- name: Run script as foo user command: bash.sh become: true become_user: foo
- hosts: all become: true - name: Start apache service: apache2 state: started
- hosts: all roles: - { role: myrole, become: yes } - myrole2

Page 1 of 1