# I want to run playbook in a private ec2 instance through a jumpbox server and i am running my playbook through AWX and AWX is installed in a another ec2 instance

**URL:** <https://forum.ansible.com/t/i-want-to-run-playbook-in-a-private-ec2-instance-through-a-jumpbox-server-and-i-am-running-my-playbook-through-awx-and-awx-is-installed-in-a-another-ec2-instance/255>\
**Category:** Get Help\
**Tags:** awx\
**Created:** [September 4, 2023, 6:34pm UTC](https://forum.ansible.com/t/i-want-to-run-playbook-in-a-private-ec2-instance-through-a-jumpbox-server-and-i-am-running-my-playbook-through-awx-and-awx-is-installed-in-a-another-ec2-instance/255 "2023-09-04T18:34:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikhil](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@Nikhil](https://forum.ansible.com/u/Nikhil)\
**Post date:** [September 4, 2023, 6:34pm UTC](https://forum.ansible.com/t/i-want-to-run-playbook-in-a-private-ec2-instance-through-a-jumpbox-server-and-i-am-running-my-playbook-through-awx-and-awx-is-installed-in-a-another-ec2-instance/255/1 "2023-09-04T18:34:50Z")

</div>

I have launched three ec2. in one ec2 i have installed AWX and in another one i have make a jumpbox server as i have opened both private and public ips and in another ec2 i have make server private.

Now i have written a config file in jumpbox server and added both ips of private and AWX server in that config file. in a defined group  
and now i can ssh into both awx and private server from jumpbox server.

Now i want to run playbook from awx server ui that should made changes into private server ip. and jumpbox will act as a role to bypass those playbook as i want to target jumpbox server from my awx server .

---

<div class="post-metadata">

**Author:** ![IPvSean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ipvsean/32/1153_2.png) [@IPvSean](https://forum.ansible.com/u/IPvSean)\
**Post date:** [September 5, 2023, 7:35pm UTC](https://forum.ansible.com/t/i-want-to-run-playbook-in-a-private-ec2-instance-through-a-jumpbox-server-and-i-am-running-my-playbook-through-awx-and-awx-is-installed-in-a-another-ec2-instance/255/2 "2023-09-05T19:35:00Z")

</div>

The keyword you want to search on is `proxy`. In the **tips and tricks** section there is a small snippet here: [31. Controller Tips and Tricks — Automation Controller Administration Guide v4.4](https://docs.ansible.com/automation-controller/latest/html/administration/tipsandtricks.html#setting-up-a-jump-host-to-use-with-the-controller)

The one I am most familiar with here is within your inventory to setup the Ansible variable `ansible_ssh_common_args`

from the documentation example:

```auto
ansible_user: <user_name>
ansible_connection: ssh
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q <user_name>@<jump_server_name>"'

```

- The `-o` is for `-option` which allows us to specify `ProxyCommand`, a reserved value
- The `-W` allows to set a host:port, specifically the man page says “Requests that standard input and output on the client be forwarded to host on port over the secure channel”
- The `-q` is for quiet mode

There is a more detailed guide here: [Frequently Asked Questions — Ansible Documentation](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-configure-a-jump-host-to-access-servers-that-i-have-no-direct-access-to)

How are you storing your inventory in AWX, are you using Git?

---

<div class="post-metadata">

**Author:** ![Nikhil](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@Nikhil](https://forum.ansible.com/u/Nikhil)\
**Post date:** [September 12, 2023, 1:12pm UTC](https://forum.ansible.com/t/i-want-to-run-playbook-in-a-private-ec2-instance-through-a-jumpbox-server-and-i-am-running-my-playbook-through-awx-and-awx-is-installed-in-a-another-ec2-instance/255/3 "2023-09-12T13:12:04Z")

</div>

I am using ansible vault to store my credentials. but again i am not getting clear picture as i am not getting ways to run ansible playbooks.

Please tell me how i can run playbook in my AWX server and it should run on private ec2 instance through jumpbox as i have also setup three instances.  
Can you help me with the steps that i should follow  
as i have configured jumbox with private instance and AWX instance through writing a config file.
