ssh to tower nodes fail unless -v arg present

Hi all, this is my first post here :slight_smile:

I want to report a situation i have been observing.

I need to deploy/monitor with ansible a service on the tower nodes as root, so to archieve this I have created a dummy user with a ssh key the tower can use to ssh to the tower nodes and from there become root to deploy the service.

In my invetory definition variables of the nodes I have:

ansible_private_key_file: “~/.ssh/awxssh_id_rsa”

so I can see in the tower output is trying to pick it up the key I have defined.

If i try to access the nodes I always get this error, even if the key is there and accessible:

Data could not be sent to remote host "XXX.XXX.XXX.XXX". Make sure this host can be reached over ssh: no such identity: /var/lib/awx/.ssh/awxssh_id_rsa: No such file or directory\r\nPermission denied (publickey,gssapi-keyex,gssapi-with-mic,password).\r\n"

I work usually with ssh so I am familiar with the usage of keys and ssh in general but I was surprised I did not manage it to work until I added:

ansible_ssh_args: “-v”

to the inventory definition variables.

I have tried several times and as long as i remove the vebosity of the ansible ssh the command fails again so i though to report it here to get your opinions about it.

Bests,
J

I forgot it, for additional information in case is needed.

The playbook to run is pretty simple is just a service unit template in jinja that have to be deployed by ansible at /lib/systemd/system.

It has not any additional variables defined in tower.

In the tower template the credentials for user awxss where present on the test but that did not any difference, just when adding the “-v” argument to the ssh