# Unable to connect to remote host on Ansible Tower setup

**URL:** <https://forum.ansible.com/t/unable-to-connect-to-remote-host-on-ansible-tower-setup/28775>\
**Category:** AWX Project\
**Created:** [October 12, 2018, 2:34pm UTC](https://forum.ansible.com/t/unable-to-connect-to-remote-host-on-ansible-tower-setup/28775 "2018-10-12T14:34:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spyridoula\_Tragopoul](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Spyridoula\_Tragopoul](https://forum.ansible.com/u/Spyridoula_Tragopoul)\
**Post date:** [October 12, 2018, 2:34pm UTC](https://forum.ansible.com/t/unable-to-connect-to-remote-host-on-ansible-tower-setup/28775/1 "2018-10-12T14:34:36Z")

</div>

Hi everyone,

I am trying to run ./setup.sh using only remote host but I am getting this error:

TASK [config\_dynamic : Ensure user is root] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [10.192.1.196]: FAILED! =\> {“changed”: false, “msg”: “UID on remote machine is 1000 (0 required). Check Ansible connection and become settings.”}

Please find below the inventory file that I am using. I am using the root user of this machine to connect and also when ansible tries to connect to my host, everything is OK.

TASK [config\_dynamic : Ensure connectivity to hosts and gather facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [10.192.1.196]

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [October 12, 2018, 2:46pm UTC](https://forum.ansible.com/t/unable-to-connect-to-remote-host-on-ansible-tower-setup/28775/2 "2018-10-12T14:46:40Z")

</div>

Spyridoula,

It looks like maybe your user isn’t a root user, but is capable of becoming root (i.e. sudo). If that’s the case then you want to invoke setup.sh using something like this:  
ANSIBLE\_BECOME=true ./setup.sh

Alternatively you can convey the become in your inventory file, instead of via an env var.

---

<div class="post-metadata">

**Author:** ![Spyridoula\_Tragopoul](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Spyridoula\_Tragopoul](https://forum.ansible.com/u/Spyridoula_Tragopoul)\
**Post date:** [October 12, 2018, 2:57pm UTC](https://forum.ansible.com/t/unable-to-connect-to-remote-host-on-ansible-tower-setup/28775/3 "2018-10-12T14:57:36Z")

</div>

Hi Chris,

Thank you very much for your immediate reply.

Well, I tried both solutions you suggested but now I am not even able to connect to host.

Firstly, I added I run the setup like this: ANSIBLE\_BECOME=true ./setup.sh.  
Also, I added **ansible\_become=true** on the inventory file.

For both cases I received the error below:

TASK [config\_dynamic : Ensure connectivity to hosts and gather facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [10.192.1.196]: FAILED! =\> {“changed”: false, “module\_stderr”: “Shared connection to 10.192.1.196 closed.\r\n”, “module\_stdout”: “sudo: a password is required\r\n”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1}

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [October 12, 2018, 3:14pm UTC](https://forum.ansible.com/t/unable-to-connect-to-remote-host-on-ansible-tower-setup/28775/4 "2018-10-12T15:14:10Z")

</div>

Ok, sounds like your user is a added to the root group then; while the install playbook assumes you would be installing as THE root user (uid=0). I would recommend commenting out that preflight check. Ideally, we would make sure the user is in either uid=0 or gid=0.

---

<div class="post-metadata">

**Author:** ![Spyridoula\_Tragopoul](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Spyridoula\_Tragopoul](https://forum.ansible.com/u/Spyridoula_Tragopoul)\
**Post date:** [October 12, 2018, 3:31pm UTC](https://forum.ansible.com/t/unable-to-connect-to-remote-host-on-ansible-tower-setup/28775/5 "2018-10-12T15:31:13Z")

</div>

Could you please explain in more detail how to comment out this check?  
I searched in install.yml for this step (**TASK [config\_dynamic : Ensure user is root**) but I cannot find it.

---

<div class="post-metadata">

**Author:** ![rpetrell](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@rpetrell](https://forum.ansible.com/u/rpetrell)\
**Post date:** [October 12, 2018, 3:40pm UTC](https://forum.ansible.com/t/unable-to-connect-to-remote-host-on-ansible-tower-setup/28775/6 "2018-10-12T15:40:17Z")

</div>

Spyridoula,

This mailing list is specific to the open source Ansible AWX project. If you’re having trouble installing Red Hat Ansible Tower, please reach out a Red Hat support representative.
