Ansible简介

环境说明

1
Centos7.6

使用源码安装Python3.9.8

升级pip

1
pip3 install --upgrade pip

安装Ansible最新版本

1
2
3
4
5
6
7
8
#/usr/local/python/bin/pip3 install ansible
pip3 install ansible

#/usr/local/python/bin/ansible --version
ansible --version

ln -s /usr/local/python/bin/ansible /usr/local/bin/
ansible --version

安装Ansible指定版本

1
2
3
4
#/usr/local/python/bin/pip3 install ansible==2.1.1
#/usr/local/python/bin/pip3 install ansible==1.9.1
pip3 install ansible==2.1.1
pip3 install ansible==1.9.1

查看帮助

1
2
3
/usr/local/python/bin/ansible-doc -l    #查看总帮助
/usr/local/python/bin/ansible-doc -s shell #查看shell模块的帮助
/usr/local/python/bin/ansible-doc -s raw