Ansible Basic Introduction and installation of Ansible on the CentOS7 and implementation of the non-interactive management

Source: Internet
Author: User

I. Overview of Ansible
Due to the rapid development of the Internet, the speed of product replacement gradually accelerated, operations and maintenance personnel to carry out a large number of daily operations, still in accordance with the traditional way of maintenance will make the work inefficient. This is the deployment of automated operations that can accomplish these tasks as safely and efficiently as possible.
Ansible is based on the development of Pythen, set up a number of excellent operational tools, the advantages of the implementation of the batch Run command, deployment procedures, configuration system and other functions. By default, remote command execution or configuration via the SSH protocol eliminates the need to deploy any client agent software, making it easier to deploy an automated environment. It can support multiple hosts and manage them, which makes the management host more convenient.
Second, ansible core components
Ansible can be seen as a framework for working with modules based on the working framework, and the bulk deployment capability is implemented by the modules run by Ansible. In short, Ansible is based on "modules" to accomplish various "tasks". Its basic framework structure is as follows.

The Ansible basic framework consists of six parts:
Host Inventory hosts checklist: Used to define the hosts managed by Ansible, by default in Ansible
Hosts are defined in the hosts configuration file, and also supports customizing Dynamic host manifests and specifying the location of other profiles.
Connection Plugins Connection Plug-in: Responsible and managed host for communication. In addition to supporting the use of SSH connection managed host, Ansible also supports other connection methods, so a connection plug-in is required to connect each host with the connection plug-in to the ansible.
Playbooks script: A configuration file used to centralize the definition of a ansible task, a task that is defined in a script ansible automated, and can be run by a control host for multiple managed hosts simultaneously.
Core Modules module: is a ansible module that uses these modules to distribute resources to managed hosts to perform specific tasks or match specific states.
Custom Modules Customization Module: For the completion of the module functions of the supplement, with the help of relevant plug-ins to complete logging, send mail and other functions.
Third, install the ansible on the CentOS7 and realize the interaction-free
Experimental environment: 3 sets of CentOS7
Requires 3 virtual machines in the same network segment.

Use Yum to install ansible online directly.



Enter the Hosts file to define the server IP addresses that you need to manage.


Generate the key and the public key. The public key needs to be known to the managed server.


The public key can be seen on the managed server

Whether the experiment can communicate with the managed server.

Implementation-Free interaction

Ansible Basic Introduction and installation of Ansible on the CentOS7 and implementation of the non-interactive management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.