Posts tagged Ansible

Error connecting to the Tower server

0

If you’re using Ansible Tower on Red Hat 7 or CentOS 7 you might see the yellow-mark on the top right page saying: “Live events: error connecting to the Tower server” or get errors when using the API (And the web-interface is one big graphical API) when adding groups, giving a ‘500’ error. This is a known issue, and you can do the following to step back python’s ssl handling package:

rpm -Uvh --oldpackage http://bo.mirror.garr.it/1/slc/centos/7.1.1503/updates/x86_64/Packages/python-2.7.5-18.el7_1.1.x86_64.rpm \
http://bo.mirror.garr.it/1/slc/centos/7.1.1503/updates/x86_64/Packages/python-devel-2.7.5-18.el7_1.1.x86_64.rpm \
http://bo.mirror.garr.it/1/slc/centos/7.1.1503/updates/x86_64/Packages/python-libs-2.7.5-18.el7_1.1.x86_64.rpm

# Once you do that, restart the tower services:

ansible-tower-service restart

Installing Ansible Tower

0

When installing Ansible tower on CentOS 7 in my lab environment I noticed some problems during the install. When downloading and running the installer you’ll see these notices:

TASK [preflight : Preflight check - Read in tower version] *****************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "file not found: /var/lib/awx/.tower_version"}

...ignoring

(...)

TASK [preflight : Preflight check - Passwords must be defined for a fresh install]
*****************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Please configure passwords in the inventory file before running setup"}

 to retry, use: --limit @/home/ansible/ansible-tower-setup-3.1.4/install.retry

The fix is easy. Provide passwords in the ‘inventory’ file and restart the installer. It will now configure Ansible for you with all requirements such as Postgres, Supervisord, RabbitMQ and Nginx for you with the provides passwords.

[tower]
localhost ansible_connection=local

[database]

[all:vars]
admin_password='redhat'

pg_host=''
pg_port=''
pg_database='awx'
pg_username='awx'
pg_password='redhat'

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

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

After the installation, browse to http://hostname, in my case http://ansible1 and you’ll be headed towards the Red Hat Ansible website to request a license. A 10-node license is free and will for your needs for training purposes towards Red Hat Certificate of Expertise in Ansible Automation exam (EX407).

Ansible slow on CentOS servers

0

If you’re getting started with Ansible you’ll notice it can be slow on servers running CentOS (or Red Hat). The reason for this is that CentOS systems have Kerberos authentication for SSH enabled by default. If you set GSSAPIAuthentication to no in /etc/ssh/sshd_config then things will speed up. And since you’re editing the configuration file, also set the UseDNS value to nu to save another DNS-lookup. You shot notice Ansible isn’t as slow as before.

You can also set this configuration for the Ansible user in the ~/.ssh/config file of the ansible user in case you are using an IPA server and/or Kerberos authentication in your environment.

[ansible@ansible-server ~]$ cat ~/.ssh/config 
Host * 
    GSSAPIAuthentication no

 

 

Go to Top