Ansible is a new automated o&M tool. Developed based on Python, ansible combines the advantages of many o&M tools (Puppet, CFEngine, Chef, func, and Fabric) to implement batch system configuration, batch program deployment, and batch command running.

Ansible works on a modular basis and does not have bulk deployment capabilities of its own. The real bulk deployment is the module that Ansible runs on, ansible just provides a framework. Mainly include:

  • Connection plugins: responsible for communication with the monitored end;
  • Host inventory: Specifies the host to operate on. This is the host to be monitored in the configuration file.
  • Various modules core module, Command module, custom module;
  • With the help of plug-ins to complete the log mail and other functions;
  • Playbook: When playbooks perform multiple tasks, nodes can run multiple tasks at once if they are not required.

To learn more about Ansible:Automated operation and maintenance tool Ansible

Ansible architecture:

Ansible features:

  • Modularity: Call specific modules to accomplish specific tasks
  • There are three key modules: Paramiko, PyYAML, and Jinja2 (template language)
  • Support for custom modules
  • Based on Python
  • Simple to deploy, based on Python and SSH(installed by default), Agentless
  • Secure, based on OpenSSH
  • Support for PlayBook scheduling tasks
  • Idempotence: Executing a task once is the same as executing it n times
  • No proxy No PKI (no SSL required)
  • Modules can be written in any programming language
  • YAML format, scheduling tasks, support rich data structures
  • More powerful multi-tier solutions

How Ansible works

  • The management terminal supports local, SSH, and Zeromq connections to the managed terminal. By default, sSH-based connections are used, which correspond to the connection module in the basic architecture diagram
  • The Host Inventory can be classified by application type, etc., and the management node realizes corresponding operation through various modules — batch execution of single module and single command, which we can call ad-hoc
  • The management node can implement functions such as web service installation and deployment and batch backup of database servers by implementing multiple tasks through PlayBooks. Playbooks can be understood simply as a system that combines multiple configuration files for ad-hoc operations

More technical courses:

Official website of Ali Yun University (Official website of Ali Yun University, Innovative Talent Workshop under cloud Ecology)