Hi @all
I am having a problem as i have launched three ec2 instances. and in one of them i have installed AWX and in another ec2 instance i have made jumpbox and in one of them i have made private instance.
Now i want to run playbook From AWX server targetting private instance through jumbox server.
But when i am running playbook it is showing ssh connection issue. Can anyone help me with its steps and so to run playbook through the required process.
@anup.sah
Hi,
Can you add some more information? Your playbook etc.
It is the best to use SSH keys when running plays thru SSH.
To run a playbook from another instance you can use the delegate_to
in the playbook.
Can you post the error you are gettingfrom the ssh connection?
fatal: [ip-19x-xxx-x5-xxx.ec2.internal]: UNREACHABLE! => {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: connect to host ip-192-168-95-212.ec2.internal port 22: Connection timed out”, “unreachable”: true}
This is the issue which i am facing while running the playbook.
- name: Install nginx and start service
hosts: [ec2-19x-xxx-x5-xxx0.compute-1.amazonaws.com](http://ec2-19x-xxx-x5-xxx0.compute-1.amazonaws.com)
remote_user: root
become: yes
tasks:
- name: install nginx
apt:
name: nginx
state: latest
- name: install nginx
service:
name: nginx
state: started
Hi @anup.sah!
This appears to be a duplicate of Deploy apache in private ec2 instances using jumbox, where AWX having my playbook for installetion - you’ve posted the same error logs and the same playbook code. It’s not helpful to create multiple topics for the same issue, so I’d like to close this one and move the discussion to the other topic. If I’ve misunderstood, please let me know!