Closed prevostc closed 8 years ago
This is needed when ansible logs in as non-root initially? Or what? I'm not really sure I understand (it works for me...)
Exactly, sorry for the lack of details.
I'm using ansible locally and I don't want to run every role as root. Also, this allow users to define a specific "privileged user" with --become-user=BECOME_USER
and --become-method=BECOME_METHOD
.
This is recommended by the ansible documentation here: http://docs.ansible.com/ansible/become.html
I see. I guess I thought there was a way to run the entire role with become
but I guess not.
Since ansible 1.9, "become: yes" is the recommended privilege escalation method. It offers more flexibility to the role user and allow a role to mix root and non-root commands explicitly
http://docs.ansible.com/ansible/become.html