Ansilbe tower install fail

185 views
Skip to first unread message

Abhishek Reddy

unread,
Mar 3, 2018, 5:17:58 PM3/3/18
to Ansible Project

Hi, 

I'm trying to install ansible tower version of 3.2.3-1.el7.x86_64 on a redhat 7.4 OS. 

i'm getting error as 

TASK [postgres : create the postgres user and set the password] *****************************************************************************************************
********************************************************************************************
fatal: [localhost]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result"}
to retry, use: --limit @/root/ansible-tower-setup-3.2.3/install.retry


if i commented no_log under roles/postgres/tasks/conf.yml then it thows an error as 

TASK [postgres : create the postgres user and set the password] *******************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Sorry, user root is not allowed to execute '/bin/sh -c echo BECOME-SUCCESS-hqgjipvuthznqdqntxibmxnvjefrifob; /usr/bin/python /tmp/ansible-tmp-1519939005.94-29424015426397/postgresql_user.py' as postgres on nke-lnx-dis-d108.\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
to retry, use: --limit @/root/ansible-tower-setup-3.2.3/install.retry


in roles/postgres/tasks/conf.yml file i have commented no_log and rerun the setup.sh script.

- name: create the postgres user and set the password
  postgresql_user:
    name: "{{ postgres_username }}"
    password: "{{ postgres_password }}"
  become: True
  become_user: postgres
  when: "postgres_username is defined and postgres_username != '' and postgres_password is defined and postgres_password != ''"
  #no_log: True


Kindly help me how to fix this

Varun Chopra

unread,
Mar 5, 2018, 8:32:56 AM3/5/18
to Ansible Project
There's no point in making changes to the playbook(s). It's probably an issue with your inventory.

On Sunday, March 4, 2018 at 3:47:58 AM UTC+5:30, Abhishek Reddy wrote:

rjwagn...@gmail.com

unread,
Jul 24, 2018, 9:21:12 AM7/24/18
to Ansible Project
I'm hitting this issue, too, on 3.2.5.  What's wrong with my inventory:

rowagn@dbatower01:~/ansible-tower-setup-bundle-3.2.5-1.el7#> more inventory
[tower]
localhost ansible_connection=local

[database]

[all:vars]
admin_password='xxx'

pg_host=''
pg_port=''

pg_database='awx'
pg_username='awx'
pg_password='xxx'

rabbitmq_port=5672
rabbitmq_vhost=tower
rabbitmq_username=tower
rabbitmq_password='xxx'
rabbitmq_cookie=cookiemonster

# Needs to be true for fqdns and ip addresses
rabbitmq_use_long_name=false

# Isolated Tower nodes automatically generate an RSA key for authentication;
# To disable this behavior, set this value to false
# isolated_key_generation=true

rjwagn...@gmail.com

unread,
Jul 24, 2018, 11:17:16 AM7/24/18
to Ansible Project
My problem isn't the inventory, it's that roles/postgres/tasks/conf.yml includes a "become_user: postgres."  Our environment precludes root from having sudo privs.  This is actually breaking several parts of the installation.
Reply all
Reply to author
Forward
0 new messages