Simple Tips : Ansible Series : P2
Ansible Series

Simple Tips : Ansible Series : P2

P2 : How does Ansible works ?

Ansible works in "Desired State"....
It will be able to identify actions to proceed or not according to this desired state.

It works by push mode :

  1. Ansible is installed on a Master node (or on a basic workstation)
  2. Connects itself in SSH Mode to all the Targets (managed servers),
  3. Push and Execute on them the concerned Modules
  4. Finally Delete these Modules at the end of process.


by chart ?

Aucun texte alternatif pour cette image


Configuration File :

A File that contains all ansible settings

  • The default path : /etc/ansible/ansible.cfg
  • it's called ansible.cfg
  • Contain all the default values : log paths,debugging colors,plugins.....etc.


Inventory :

Ansible requires an inventory which contains the list of all the managed servers.

  • The defaut path : /etc/ansible/hosts
  • 2 types of inventory :
  1. Static : a simple txt file.
  2. Dynamic : CMDB as an exmaple.
  • 5 Types of declaration : Local, IP list, Groups, Subgroups, Parent:Children.


Playbook :

A Yaml file that contains one or several play,each play is composed from one or several tasks
 
  • The default path : /etc/ansible/roles.
  • Playbook are files written in YAML with the extension *.yml
  • Playbook contain one or several tasks but at least one task to be lunched.
  • Every task should be completed before moving to the next one.


Master node :

The machine that control all the managed servers using ssh.
  • The machine where ansible should be installed (package and dependecies).
  • The connection ssh should be open from Master to Node but not the opposit.
  • It must be based on linux !
  • the Config file and Inventory should be configured only on this machine.


The next chapter will cover : How to setup an environment !!

The Main Goal is To Make it easy for Others!


要查看或添加评论,请登录

Mustapha JDAD的更多文章

社区洞察

其他会员也浏览了