ruk·si

⚙️ Ansible
Become

Updated at 2017-03-22 01:46

become allows changing which user is used to execute the task or playbook.

- name: Run a command as the apache user
  command: echo hello
  become: true
  become_user: apache           ; optional, defaults to 'root'
  become_method: su             ; optional
  become_flags: '-s /bin/sh'    ; optional

Sources