Scenario - I am logged in to my Ansible server as “0lai” but would like to run my testPlay.yml as a different user (“ansible”) so I used the —user option. However, I don’t know user ansible’s password and would like to make it a passwordless run. I used thee —key-file option and provided the private key file of user ansible. This fails because user 0lai does not have read permission on user ansible’s private key. When i tried to give group read permission to ansible, it worked as expected. However, the private key shouldn’t be readable to anyone but the owner right?
Is there any way I can, as “0lai”, use “ansible” to connect to my managed nodes passwordlessly?