Automation is crucial these days as IT environments are too complex. It not just makes developers’ jobs more manageable but allows them to pay attention to other tasks as well to add value to an organization's efficiency. Configuration management tools help you to run an audit of your system to quickly identify where the problem is coming from. If a server goes down for an unknown reason, you can deploy a new one quickly and have a record of any changes or updates that occurred so you can identify the source of the problem.
If you want to become a Certified Ansible Specialist, then visit Mindmajix - A Global online training platform: “Ansible Certification Training”. This course will help you to achieve excellence in this domain.
Ansible is rapidly rising to the top in the world of configuration management automation tools. So, stay tuned with us to find out what is Ansible, why to use it and why it is so popular.
Ansible is an open-source automation tool used for IT tasks such as application deployment, configuration management, intraservice orchestration, and provisioning. It is very simple to set up and no special coding skills are needed to use it. There is no need to install any firewall or software on the client systems you want to automate. You can customize and orchestrate the entire application environment irrespective of its deployment.
1. Automation Dashboard
It shows a heads-up NOC-style automation dashboard that contains information about everything going on in your Ansible environment.
2. Delegation and Self-Service
It imports users, teams, and organizations from your SAML, AD, or LDAP directory, and delegates push-button access to automation with easy question and answer configuration, automatic scheduling, and more.
3. Scale-out Clustering
Connect multiple Tower nodes into a Tower cluster to add redundancy and capacity to your automation platform, including reserved capacity and remote execution points of presence. Add push-button deployment and scaling when running in Red Hat OpenShift Container Platform.
4. Role-Based Access Control
Creates the necessary separation and isolation of users and resources. Users can safely use Ansible Tower to work only on the systems in the environments to which they have access.
5. Create automation workflows
Ansible Tower workflows allow you to chain together different automation tasks to create workflows. Model your processes and deployments natively in Tower, including recovery from failures, chained workflows, and more.
6. Auditing and Logging
All automation is securely logged and stored, with a full audit trail. Send logs to external logging and analytics platforms for detailed analysis and correlations with other alerting and management systems.
7. Inventory Management
Sync inventory from all major cloud and virtualization providers, or add custom inventory. Integrate with Red Hat Insights to view Insights Alerts and perform playbook remediation.
8. Comprehensive REST API and integrations
Stay informed of your automation status via integrated notifications, and use the REST API to connect automation to source control, continuous delivery systems, ticketing systems, and more.
Let's go step by step and find out Ansible installation in different Linux distributions.
PyYAML: a YAML parser and emitter.
parmiko: native python SSHv2 protocol library.
Httplib2: a comprehensive HTTP client library.
sshpass: a non-interactive ssh password authentication.
Distro: RHEL/ CentOS/ Debian/ Ubuntu Linux.
Jinja2: a templating language for python.
Step 1: Install the EPEL repo
[root@ansible-server ~]# sudo yum install epel-release
Step 2: After that, install the Ansible package.
[root@ansible-server ~]# sudo yum install -y ansible
Step 1: First perform an update to the packages
$ sudo apt update
Step 2: Then install the software properties common package.
$ sudo apt install software-properties-common
Step 3: And install the Ansible personal package archive.
$ sudo apt-add-repository ppa:ansible/ansible
Step 4: Install the Ansible.
$ sudo apt update $ sudo apt install ansible
The pip command is a tool for installing and managing python packages.
Step 1: This given method works on the Linux and UNIX like systems.
$ sudo pip install ansible
Install the latest version of Ansible
$ emerge -av app-admin/ansible
To install the latest version, you need to unmask the Ansible package prior to emerging:
$ echo 'app-admin/ansible' >> /etc/portage/package.accept_keywords
Ansible works with both python 2 and 3 versions, FreeBSD has different packages for each python version. To install you can use:
$ sudo pkg install py27-ansible Or $ sudo pkg install py36-ansible
You can also to install from ports:
$ sudo make -C /usr/ports/sysutils/ansible install
The Ansible is available for Solaris as SysV package from openCSW:
# pkgadd -d http://get.opencsw.org/now # /opt/csw/bin/pkgutil -i ansible
Ansible is available in the community repository:
$ pacman -S ansible
Ansible build script is available in the SlackBuilds.org repository. Also can be built and installed using sbopkg.
Step 1: Create a queue with Ansible and all dependencies.
# sqg -p ansible
Step 2: Build and install packages from the created queue file.
# sbopkg -k -i ansible
Step 1: Ansible and its dependencies are available as part of the sysadmin host management bundle.
$ sudo swupd bundle-add sysadmin-hostmgmt
Step 2: And update of the software will be managed by the swupd tool.
$ sudo swupd update
By using yum
$ sudo dnf install python-argcomplete
On RHEL and CentOS:
$ sudo yum install epel-release $ sudo yum install python-argcomplete
By using apt
$ sudo apt install python-argcomplete
By using pip
$ pip install argcomplete
Ansible tower has three different editions as follows - self-support, standard, and the premium edition. They differ from each other on the basis of capabilities they offer. Let us have a look at the capabilities they possess.
|Ansible Tower Dashboard||Yes||Yes||Yes|
|Real-time Job Outputs||Yes||Yes||Yes|
|Remote Command Execution||Yes||Yes||Yes|
|Documented API & Tower CLI||Yes||Yes||Yes|
|Role-based Access Control||Yes||Yes||Yes|
|Logging and Analytics Integration||No||Yes||Yes|
|Ansible platform is written in Python and supports YAML commands scripts.||Puppet platform is written in Ruby and also supports Domain Specific Language (DSL) and Embedded Ruby (ERB).|
|This system is based on a single active node.||It is based on master-slave architecture|
|It uses SSH (secure shell) running system to configure nodes which you want to||Due to master-slave configuration, puppet client can configure client machine and puppet server can configure for master machine.|
|Its price is much lower than Puppet. You can spend $10000/year for up to 100 nodes.||It is expensive as you will have to spend $ 11200-$19900 / year for up to 100 nodes.|
|It is a highly secured tool with ssh||Not so secure system|
|It focuses on computer automation systems over configuration management.||It focuses on the progress of Puppet DSL over the pure Ruby version.|
|With the help of the pull and push process, it distributes configuration to the nodes and makes a faster communication.||It only supports the push process so the communication system is much slower as compared to Ansible.|
|Its initial setup is very easy to install||Installation process is difficult|
|It uses YAML language which is closer to English and makes it easy to master and manage the configuration||Puppet is configured with Puppet DSL only, therefore, you have to be a programmer to manage the configuration|
Is Ansible Tower free? As mentioned earlier, Ansible tower has three different editions. The first edition - self-support is a free trial version but to use the other two versions you need to pay for it. Let us see how much.
For standard edition - $10,000/year for upto 100 nodes
Premium edition - $14,000/year for upto 100 nodes
Ansible is a simple IT automation engine used to automate configuration management, application management, cloud provisioning and many other IT needs. It requires no agents and additional custom security infrastructure and therefore, it is very easy to install.