become method
The setting that chooses which tool Ansible uses to escalate privilege: sudo by default, or alternatives such as su, doas or pbrun.
In more detail
Each method is a become plugin. become_flags passes extra arguments to the chosen tool and is rarely needed. Change the method only when the hosts use something other than sudo.
Related terms
- become — The Ansible keyword that switches on privilege escalation, so a task or a whole play runs as another account, root by default.
- sudo — A command that runs another command with administrator (root) rights after checking you are allowed to.
- plugin — An add-on package that extends a tool with extra features without changing the tool itself.
Taught in
- Connections And Privilege Escalation — Ansible Configuration Management at Scale
- ansible.cfg: Which File Wins, And The Settings That Matter — RHCE in Ansible (EX294): Automate Red Hat Systems
- Privilege Escalation: sudo Rules And become — RHCE in Ansible (EX294): Automate Red Hat Systems
- RHEL System Roles: timesync And selinux From A Collection — RHCE in Ansible (EX294): Automate Red Hat Systems