Default ansible 2.9 configuration.
User
user
exists both on the control and the hosts.Control and hosts have each other's ssh public keys for both users.
From the control host:
root$ ansible all -a "echo whatever"
works
user$ ansible all -a "echo whatever"
works
user$ ansible all -a "echo whatever" -u root
doesn't work.
Error: ... Failed to connect to the host via ssh: root@xhost: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password) ...
I tried using --become*
with no success. How to make that work? what am I missing?