Ansible automated operation and maintenance deployment method for Linux system

Ansible automated operation and maintenance deployment method for Linux system

Ansible is a new automated operation and maintenance tool developed based on Python. It integrates the advantages of many old operation and maintenance tools to realize batch operating system configuration, batch program deployment, batch command running and other functions. Let's take a look at how to deploy

In the command line, extract the Ansible source code, git clone git://github.com/ansible/ansible.git --recursive as shown below

Enter the installation directory cd ./ansible directory and execute the installation source ./hacking/env-setup -q

If pip is not installed on the system, install the corresponding pip version first:

easy_install pip

Install the Python modules required by the Ansible control machine

pip install paramiko PyYAML Jinja2 httplib2 six

When you update the Ansible version, you need to update not only the git source tree, but also the modules in git that point to Ansible itself, called submodules.

Once the env-setup script is run, it means that Ansible will clean up the file inventory from the source code. You can specify another location

2. Yum installation method (Centos7x64)

Use the rpm command to install the yum extension source: rpm -Uvh http://mirrors.zju.edu.cn/epel/7/x86_64/e/epel-release-7-7.noarch.rpm

Install with the yum command, yum -y install ansible

You may also be interested in:
  • Installation tutorial of Ansible for Python automation
  • Detailed tutorial on using the Linux automated operation and maintenance tool Ansible
  • Cluster operation and maintenance automation tool Ansible uses playbook to install the zabbix client
  • Installation and use of cluster operation and maintenance automation tool ansible (including module and playbook use)
  • Ansible as a Python module library method example
  • Python uses ansible to distribute processing tasks
  • Detailed explanation of Ansible, a centralized management platform
  • Python converts ansible configuration to json format example code
  • Python ansible service and script writing
  • Introduction to Ansible and YAML, a Python centralized management platform
  • Python automated operation and maintenance Ansible definition of host and group rules operation detailed explanation

<<:  How to use module fs file system in Nodejs

>>:  Common commands for mysql authorization, startup, and service startup

Recommend

Steps to transfer files and folders between two Linux servers

Today I was dealing with the issue of migrating a...

Detailed explanation of Vue3.0 + TypeScript + Vite first experience

Table of contents Project Creation Project Struct...

Monitor changes in MySQL table content and enable MySQL binlog

Preface binlog is a binary log file, which record...

Summary of HTML formatting standards for web-based email content

1. Page requirements 1) Use standard headers and ...

Introduction and use of five controllers in K8S

Table of contents Controller type of k8s Relation...

Detailed explanation of several storage methods of docker containers

Table of contents Written in front Several storag...

Detailed explanation of MySQL Explain

In daily work, we sometimes run slow queries to r...

Linux ssh server configuration code example

Use the following terminal command to install the...

Building FastDFS file system in Docker (multi-image tutorial)

Table of contents About FastDFS 1. Search for ima...

Learning about UDP in Linux

Table of contents 1. Introduction to UDP and Linu...

Example of using CASE WHEN in MySQL sorting

Preface In a previous project, the CASE WHEN sort...

Summary of the Differences between find() and filter() Methods in JavaScript

Table of contents Preface JavaScript find() Metho...

Nginx reverse proxy to go-fastdfs case explanation

background go-fastdfs is a distributed file syste...

jQuery implements HTML element hiding and display

Let's imitate Taobao's function of displa...