一、下载ansible源码

https://releases.ansible.com/ansible/

CentOS7 1 安装 ansible

 

二、使用python安装ansible

1、安装ansible的python依赖包

pip3 install paramiko PyYAML jinja2

2、安装ansible

mkdir /u01/soft/ansible/

tar -vzxf ansible-2.9.4.tar.gz

mv ansible-2.9.4 ansible

cd ansible

python3 setup.py install

CentOS7 1 安装 ansible

 

 3、创建Ansible配置文件,并开启Ansible日志(Ansible默认不启用日志)

mkdir /etc/ansible

cp /u01/soft/ansible/ansible/ansible.cfg /etc/ansible/

sed -i 's/#log_path/log_path/' /etc/ansible/ansible.cfg

4、验证ansible安装结果

ansible --version

CentOS7 1 安装 ansible

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
  • 2022-01-12
  • 2021-11-20
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2022-02-13
  • 2021-10-28
  • 2021-05-22
相关资源
相似解决方案