When trying to run an ansible playbook for a cisco switch we receive “Permission denied: /opt/morpheus/.ssh/ansible”. The morpheus-app user is running the ansible-playbook task and is also the owner of the /opt/morpheus/.ssh/ansible file. The other strange fact is that we are not using keys to access the cisco switches, only username/password.
I’m trying to run a playbook against a cisco switch. My inventory file looks like this:
I found private_key_file setting was set in /etc/ansible/ansible.cfg. I removed the default and it works now. I still am wondering where become_method: sudo is coming from and why the morpheus_app user could not access its own private key file though.