OS情况:
[root@zhaoxp2-001 etc]# more system-release
CentOS release 6.5 (Final)
[root@zhaoxp2-001 etc]# uname -a
Linux zhaoxp2-001.novalocal 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@zhaoxp2-001 etc]#
保证OS包epel已安装:
[root@zhaoxp2-001 etc]# rpm -qa|grep epel-release
epel-release-6-8.noarch
[root@zhaoxp2-001 etc]#
已安装Python 2.7.13。
安装ansible需要的包:
pip install paramiko PyYAML Jinja2 httplib2 six pycrypto
安装:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
yum -y install ansible
参考:
http://www.ansible.com.cn/docs/intro_installation.html
https://my.oschina.net/u/3413282/blog/876231