Alternate SSH using ssh_executable

,

I just started experimenting with AWX. I have it running on a GCP instance and am trying to get it to run a command on another instance. I can’t ssh from one instance to the other, but I can connect with gcloud compute ssh. I wrote a wrapper script to extract the instance name, zone, and project from the host name and run gcloud compute ssh, and would like to set that script as the value for ssh_executable. So far, I haven’t been able to get that to work. I have that setting in /etc/ansible/ansible.cfg and have also tried setting it as a variable on the host in the AWX UI. I’m trying to run a command by selecting the host on the HOSTS page and clicking RUN COMMANDS. When I do that, the command fails and shows this message:

“msg”: “Failed to connect to the host via ssh: ssh: connect to host xxx port 22: Connection timed out”

So it’s obviously not running my script. Does anyone know how to do this? Or is there a better way to do what I’m trying to do?

Thanks.

Andy

Hello Andy

Is there a [political] reason you can’t use normal SSH? You’re better off solving this than trying this route.
As I undertand it gcp compute ssh is just a thin wrapper around SSH anyway, so native SSH will work.

Why do you need to SSH from one node to another (which I assume isn’t AWX)? AWX will be your control point and SSH into all other nodes.

Phil.