Ansible简介

环境说明

Centos7.6

使用源码安装Python3.9.8

升级pip

pip3 install --upgrade pip

安装Ansible最新版本

#/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指定版本

#/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

查看帮助

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