# AWX

**URL:** <https://forum.ansible.com/t/awx/37502>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [December 28, 2022, 6:49am UTC](https://forum.ansible.com/t/awx/37502 "2022-12-28T06:49:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suchi\_Bhargav](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@Suchi\_Bhargav](https://forum.ansible.com/u/Suchi_Bhargav)\
**Post date:** [December 28, 2022, 6:49am UTC](https://forum.ansible.com/t/awx/37502/1 "2022-12-28T06:49:57Z")

</div>

Hey ,

do we have to put variable in hosts configuration for connecting host with awx ui using ssh ?  
ansible\_host: 172.16.145.49  
ansible\_connection: local  
//ansible\_python\_interpreter: ‘{{ ansible\_playbook\_python }}’  
ansible\_ssh\_pass: Suchi@123  
ansible\_sudo\_pass: Suchi@123  
ansible\_connection: ssh  
ansible\_port: 22  
ansible\_user: suchi  
ansible\_become: true

this is my variables but it gives error : “msg”: “Failed to connect to the host via ssh: ssh: connect to host 172.19.0.3 port 22: Connection timed out”,  
but when i remove ansible\_ssh\_pass, ansible\_ssh\_connection , ssudo\_pass

ping playbook working properly but playbook which install package is not working

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [January 4, 2023, 7:58pm UTC](https://forum.ansible.com/t/awx/37502/2 "2023-01-04T19:58:29Z")

</div>

Are you setting up an inventory with the hosts to run this job template with? you may need to create a machine credential with the ssh key, and attach the credential to the job template.

here is the official docs for setting up an inventory [https://docs.ansible.com/automation-controller/latest/html/userguide/inventories.html](https://docs.ansible.com/automation-controller/latest/html/userguide/inventories.html)

Hope that helps

AWX Team
