Ansible installation step by step

Ansible installation,Ansible
Ansible installation step by step

what is ansible?

Ansible is an open-source IT deployment tool configuration management tool.

Ansible History

Michael DeHaan developed Ansible and the Ansible project began in February 2012.

Redhat acquired the ansible tool in 2015

Ansible is available for Redhat, Debian, Centos, Oracle Linux

In terms of code into "infrastructure ie your computing environment has

same attributes as your application.

Ansible works on the PUSH mechanism.

Ansible server directly connected with nodes.Server direct push to their nodes.

Ansible is written in YAML 

Ansible is agentless.

Ansible communicates through ssh to their nodes.

Ansible has a playbook and it is a list of tasks perform to execute against  hosts.

Ansible Advantages

Ansible is free to use by everyone

Ansible is very consistent and lightweight it is very secure due to its agent-less capabilities and open ssh

security features.

ansible does not need any special system administration skills and uses it.

Insufficient user interface. cannot achieve full automation by ansible.

new in the market, therefore limited support and document are available.

Terms used in Ansible

Ansible server

The server is installed  from which all tasks and playbooks will be run

Module

It  is a set of similar commands meant to be executed on the client-side

Task

 It consists of a single procedure to be completed

Role

It is a way of Organising tasks and related files to be later called in a playbook

Fact

Important information is fetched from the client system from the global variable with the gather facts

operation.

Inventory

the file containing data about the ansible client-server.

Play

Execution of a playbook

Handlers

A task which is called only if a notifier is present

Notifier

Section attributes to a task which calls handlers if the output is changed

Playbooks

It consists of code  written in YAML format which describes tasks to be executed

Hosts

Nodes are automated by Ansible.

Installation of Ansible

Go to AWS account  and create 3 EC2 instances in the same Availability zones and take 

access through putty.

login to AWS account through ec2-user 

#sudo su

#wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

# yum install update -y

Now install all packages one by one

# yum install git python python-level python-pip OpenSSL ansible -y

Now go to the host file inside the Ansible server and paste private ip-address

of node1 and node2.

# vim /etc/ansible/hosts

[Demo]

node 1 IP address

node 2 IP address

 the host file is only working after updating ansible.cfg

# vim /etc/ansible/ansible.cfg

now uncomment this # file

# inventory = /etc/ansible/hosts

# sudo-user= root

 create one user in all the three instances

# adduser ansible

# passwd ansible

now switch as ansible user

#su - ansible

# visudo

 root ALL=(ALL)  ALL

 ansible ALL=(ALL) NOPASSWD:ALL

:wq!

#sudo yum install httpd -y

Ansible installation step by step
Ansible installation step by step



Ansible installation step by step
Ansible installation step by step



Ansible installation step by step
Ansible installation step by step
Ansible installation step by step
Ansible installation step by step



Ansible installation step by step
Ansible installation step by step

Ansible installation step by step
Ansible installation step by step




Ansible installation step by step
Ansible installation step by step


Ansible installation step by step
Ansible installation step by step




                    
 
  
 

    Read moreAll about Nagios Monitoring Tools

    Read moreUses of samba server and  key features of the samba server 







Previous
Next Post »