Closed samvarankashyap closed 5 years ago
I agree that using sudo
underneath is probably not the best option because we need the user to either have sudo
access or running the playbook binary as root.
My rationale at the time I did it was that because the built playbook could not know what's underneath, it should be prepared to work with the majority of playbooks, and at least on my use-cases, most of them have at least one task that required become: true
.
But thinking about it now, it makes complete sense to delegate this choice to the developer, not to the tool. Instead of having a flag the binary should run as whatever user has invoked it. If your playbook requires become: true
, then ensure you run it under a privileged user OR a user with sudo access. What do you think?
@samvarankashyap Thanks for the input on this.
I've removed the privileged access to run ansible-playbook
. If you need to run your playbook with privileged access, then you will need to run the binary with a privileged user permissions. See release v1.2.0 :tada:
Currently when i run the binary its running as a privileged user. however, most of the times its not necessary and it should be optional to run the binary as a privileged user. if user would like to run under sudo permissions they can always do it by appending sudo to binary or with --become an option