2.1源码安装
# git clone https://github.com/ansible/ansible.git
# cd ./ansible
# source ./hacking/env-setup
2.2 yum和apt 安装
# yum install ansible
# apt-get install ansible
2.3 pip安装
# pip install ansible
或者
# wget http://mirrors.aliyun.com/pypi/packages/ae/b7/c717363f767f7af33d90af9458d5f1e0960db9c2393a6c221c2ce97ad1aa/ansible-2.9.6.tar.gz
# tar -zxvf ansible-2.9.6.tar.gz
# cd ansible-2.9.6
# python setup.py install