9-Ansible Management Tools

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Complete Ansible Automation Training

Ansible
Management Tools
Ansible Management Tools
• Ansible management tool provides centralized web interface to manage your playbooks,
inventories and everything you do through a command line

• These tools also manage multiple Ansible control nodes

• There are 2 Ansible management tools


• Ansible AWX (Free)
• Ansible Tower (Licensed product)

By: Imran Afzal


www.utclisolutions.com
Ansible AWX
• AWX stands for Ansible WorkX

• AWX is a web application that provides a user interface, REST API, and task engine for Ansible

• The AWX allows you to manage Ansible playbooks, inventories, run reports and schedule jobs

• Ansible AWX is an open-source, community driven management tool

• It is the upstream product, meaning all the changes are done on AWX first before it get to Ansible
Tower

• The AWX Project is hosted on GitHub and Red Hat welcomes community contributions.

• The AWX project uses GitHub for its issue tracking as well. You can file your issues here:
• https://github.com/ansible/awx/issues

• Red Hat does NOT recommend AWX for production environments.


By: Imran Afzal
www.utclisolutions.com
Ansible AWX
Ansible AWX Pros and Cons

• Pros
• Full enterprise features and functionality of Tower
• This is available for free download and use
• Not limited the number of nodes to be added
• Great for POC/dev/lab or QA environments

• Cons
• No technical support by Red Hat
• Multiple releases in a single day are possible
• Not recommended by Red Hat to be used in production environments.

By: Imran Afzal


www.utclisolutions.com
Ansible AWX
Ansible AWX Install (Please note: AWX is deployed from the docker containers)
• Update the system
# yum update –y

• Reboot
# reboot

• Install epel-release repository


# yum/dnf install epel-release

• Install additional packages


# dnf install git gcc gcc-c++ ansible nodejs gettext device-mapper-persistent-data
lvm2 bzip2 python3-pip

• Add docker repository


# dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

• Install Docker
# dnf install docker-ce --nobest –y
# dnf install docker-ce --nobest --allowerasing

• Check Docker version


# docker --version By: Imran Afzal
www.utclisolutions.com
Ansible AWX
• Start docker
# systemctl start docker

• Enable docker at boot


# systemctl enable docker

• Install docker-compose
# pip3 install docker-compose

• Verify the docker-compose version


# docker-compose --version

• Set python command to use python3


# alternatives --set python /usr/bin/python3

• Download the latest version of Ansible AWX from the Git Hub repository
# git clone https://github.com/ansible/awx.git

• Generate a secret key for encryption of the inventory file and copy the output to a text file
# openssl rand -base64 30

By: Imran Afzal


www.utclisolutions.com
Ansible AWX
• Change directory to and edit inventory file
# awx/installer
OR # awx/tools/docker-compose
# vim inventory

• Add or modify the following parameters


[all:vars]
dockerhub_base=ansible
awx_task_hostname=awx
awx_web_hostname=awxweb
postgres_data_dir="/var/lib/pgdocker"
host_port=80
host_port_ssl=443
docker_compose_dir="/root/awx/tools/docker-compose"
pg_username=awx
pg_password=awxpass
pg_database=awx
pg_port=5432
pg_admin_password=password
rabbitmq_password=awxpass
rabbitmq_erlang_cookie=cookiemonster
admin_user=admin
admin_password=password
create_preload_data=True
secret_key=R+kbcDEUS8DlAftAbfWafVqLZ0lUy+Paqo4fEtgp
awx_official=true
awx_alternate_dns_servers="8.8.8.8,8.8.4.4"
project_data_dir=/var/lib/awx/projects
By: Imran Afzal
www.utclisolutions.com
Ansible AWX
• Create directory for postgress
# mkdir /var/lib/pgdocker

• Install AWX
# ansible-playbook -i inventory install.yml

• Open Firefox on your Linux


# http://localhost

By: Imran Afzal


www.utclisolutions.com
Ansible AWX

By: Imran Afzal


www.utclisolutions.com
Ansible Tower
• Ansible Tower is a commercial Ansible management product by Red hat which comes with
support from Red Hat as well

• Red Hat Ansible Tower is available in two editions that are differentiated by support and
features. Pricing is based on the number of nodes (systems, hosts, instances, VMs, containers or
devices) that you are managing

1. Standard
2. Premium
https://www.ansible.com/products/pricing

By: Imran Afzal


www.utclisolutions.com
Ansible Tower
Ansible Tower Pros and Cons:

• Pros
• 24hrs full technical support
• Release cycles
• Fully tested for quality and engineering issues before release
• Install/upgrades are well-documented and supported

• Cons:
• Expensive
• You may need more than 10 nodes for a dev/POC environment
• May be overkill for what you are trying to do.

By: Imran Afzal


www.utclisolutions.com
Ansible Tower
Ansible Tower Installation

• https://access.redhat.com/products/ansible-tower-red-hat

By: Imran Afzal


www.utclisolutions.com
Ansible Tower

By: Imran Afzal


www.utclisolutions.com

You might also like