Ansible

Configuration management tool :  Puppet, Chef, Rundesk, Ansible, etc

 

There are two architecture in CM tools : push and pull


Suppose there is a DTDC courier from Delhi --> to Hyderabad

In Hyd DTDC

  1. we go to Hyd DTDC and check for courier     (this is called pull)
  2. We sit in home, whenever courier comes to DTDC, they deliver to us (this is called  pull)

(Example : the notification that we receive are called push notifications because these notifications are pushed from the server to our devices, if we login to facebook and see the posts it is called pull)


Pull disadvantages : 

  1. causing more traffice on road --> more traffic in internet
  2. Unnecessary resource waste time, fuel, etc. --> bandwidth, power resources 
  3. cost
Push:
save everything, ssh protocol

Ansible is push based architecture, so it avoids the disadvantages in pull based architecture.
So Ansible is more popular than other pull based architectures like Chef, puppet, Rundesk etc.



Ansible architecture


There is one server (master) and other are called node or box





Ansible Architecture





Other tools architecture


Server connects to nodes through SSH protocol only

like from terminal if we run the below command

ssh ec2-user@<ip> -C  "echo 'hello' > /tmp/hello.txt"    --> this command creates a hello.txt file and copies hello in the file without login and only through ssh.

The same thing works in Ansible where ssh command executions are done.

And other tools use their own protocol not SSH



Ansible Modules

    playbooks

    inventory.ini --> a file contains list of servers ansible is connecting to


Comments

Popular posts from this blog