1, Introduction:
Ansible is a new automated operations tool, based on the development of Python, the collection of many operations and maintenance tools (puppet, Cfengine, Chef, func, Fabric " Although the basic has not been used ") The advantages of the implementation of the batch system configuration, Batch program deployment, batch Run command and other functions. Ansible is a module-based operation and does not have the capacity to deploy in bulk. The real batch deployment is the module that Ansible runs, and Ansible just provides a framework. Mainly include:
Connection plug-in connection plugins: responsible for and be monitored to achieve communication;
Host Inventory: Specifies the operation of the hosts, is a configuration file inside the definition of monitoring host;
Various modules core module, command module, custom module;
Through the use of plug-ins to complete log mail and other functions;
Playbook: When a script performs multiple tasks, it is not necessary to deliberately let the node run multiple tasks at once.
2. Overall architecture
650) this.width=650; "title=" wkiol1wziisqu5cyaah-aulfzmk657.jpg "alt=" wkiol1dx6xkwic1yaah-barmc_a494.jpg "src=" Http://s1.51cto.com/wyfs02/M00/83/60/wKioL1dx6XKwic1YAAH-BARMc_A494.jpg "/>
3. Characteristics
(1), no agents: no need to install any client on the managed host;
(2), no server: No servers, the use of direct command can be run;
(3), modules in any languages: Based on module work, can use any language development module;
(4), Yaml,not code: Use the Yaml language to customize the script playbook;
(5), SSH by default: work based on SSH;
(6), strong multi-tier solution: Multi-level command can be achieved.
4. Advantages
(1), lightweight, no need to install agent on the client, update, only need to make an update on the operator machine;
(2), batch task execution can be written as script, and can be executed without distributing to remote;
(3), write using Python, maintenance is more simple, ruby syntax is too complex;
(4), support sudo.
5. Task Execution Process
650) this.width=650; "title=" 16.png "alt=" Wkiol1dx6vjwt4m0aacoeh-eg0u437.png "src=" http://s1.51cto.com/wyfs02/M02/ 83/60/wkiol1dx6vjwt4m0aacoeh-eg0u437.png "/>
Description
1, the above content based on the majority of Daniel share paste based on the summary.
2. The installation environment is CentOS 6.5
This article is from "Linux OPS rookie" blog, please be sure to keep this source http://zhangchuang.blog.51cto.com/10884116/1793562
The ansible of automatic operation and maintenance tools (I.)