Difference between become and become_user in Ansible
Recently I started digging into Ansible and writing my own playbooks. However, I have a troubles with understanding difference between become and become_user . As I understand it become_user is something similar to su <username> , and become means something like sudo su or "perform all commands as a sudo user". But sometimes these two directives are mixed. Could you explain the correct meaning of them? become_user defines the user which is being used for privilege escalation . become simply is a flag to either activate or deactivate the same. Here are three examples which should make it clear: