Ansible become is a method to run a particular task in a playbook with Special Privileges like root user or some other user.

Ansible become and become_user both have to be used in a playbook in certain cases where you want your remote user to be non-root.it is more like doing sudo -u someuser before running a task.

When you are not defining the become_user and just use become. Ansible will perform the basic sudo and it will execute the corresponding task as root user

Comments