一、安装ansible
1、编写shell
vim install-ansible.sh
#! /bin/bash
#******************************************************
# Author : 枫叶20214
# Last modified : 2021-10-20
# Filename : install-ansible
# Description : 更新镜像版本
#*******************************************************
set -e
# 定义变量
yum_path="/opt/ansible"
tar_name="ansible-2.9.21.tgz"
ansible_path=