Hi,
Since commit:
commit deec50fc3cb154c1b2138bba23fe6cad812f9a11
Default -u (user) and “user:” in playbooks to the current user.
I have to specify “-u root” in every single ansible command (I log into the ansible host as a non-root user but need to connect to managed nodes as root). Is there a way to revert to the previous behaviour, short of maintaining a fork of ansible? E.g. stick the host name in the inventory file (I have it generated anyway).
Best regards,
Grzegorz Nosek
We are not going to revert since that greatly impairs the ability for people to share playbooks amongst teams where everyone uses their own credentials to manage a system and is using sudo, but ansible now has a configuration file where you can set this, and you should do so if you want this behavior.
see examples/ansible.cfg in the checkout
easily customizable
W dniu poniedziałek, 20 sierpnia 2012 20:46:25 UTC+2 użytkownik Michael DeHaan napisał:
We are not going to revert since that greatly impairs the ability for people to share playbooks amongst teams where everyone uses their own credentials to manage a system and is using sudo, but ansible now has a configuration file where you can set this, and you should do so if you want this behavior.
see examples/ansible.cfg in the checkout
easily customizable
That’s fine for me, thanks! (BTW, example/ansible.cfg contains the wrong path to the system config file, it’s /etc/ansible/ansible.cfg. my github repo has the fix but already has another pull request pending from that branch)
Best regards,
Grzegorz Nosek
FYI – You should always start a new branch for each pull request, named after what the pull request is going to contain.
You can delete the branch later.