Unable to connect to remote host on Ansible Tower setup

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]

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.

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}

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.

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.

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.