Hi all,
I am running my playbooks as user ansible (which has sudo rights) for instance but often need to escalate privileges. This can be done in multiple ways:
- specify per task: become=true
- specify for the entire playbook at the beginning: become=true
- specify for the entire host via the inventory file: ansible_become=true
Can someone shine some light on this topic about what is best practice here? It is a machine that has to install multiple roles and needs to escalate privilege often, but not always. Thanks in advance!