1、安装一些基础软件包yum -y install xz wget gcc make gdbm-devel openssl-devel sqlite-devel zlib-devel bzip2-devel

3、an衡痕贤伎sible需要python2.7及以上,centos6.5自带的python版本为2.6.6,需要升级到2.7,python是编译安散艉九慊装以下源码包的基础tar zxvf Python-2.7.8.tgzcd Python-2.7.8./configure --enable-shared --enable-loadable-sqlite-extensions --with-zlibmakemake installmv /usr/bin/python /usr/bin/python2.6.6ln -s /usr/local/bin/python2.7 /usr/bin/pythonecho -e "/usr/local/lib" >>/etc/ld.so.conf/sbin/ldconfig/sbin/ldconfig -vsed -i 's@#!/usr/bin/python@#!/usr/bin/python2.6.6@' /usr/bin/yum

6、拷贝ansible配置文件,并定义主机mkdir -p /etc/ansiblecp /root/source/ansible-1.7.2/examples/ansible.cfg /etc/ansible/ansible.cfgvim /etc/ansible/ansible.cfgremote_port = 36000private_key_file = /root/.ssh/id_rsa[root@localhost ~]# cat /etc/ansible/hosts[test]192.168.1.116
