1. ansible安装
1.1 环境
-
centos6.5系统
-
服务端python2.6及python2.7
-
客户端只需要安装python2.5及以上和ssh
1.2 部署
(1)源码安装
安装
#git clone git://github.com/ansible/ansible.git --recursive
#cd ./ansible
#./hacking/env-setup
#pip install paramiko PyYAML Jinja2 httplib2 six
# echo "127.0.0.1" > ~/ansible_hosts
# export ANSIBLE_HOSTS=~/ansible_hosts
#ansible all -m ping --ask-pass
升级
# git pull --rebase
# git submodule update --init --recursive
(2)yum安装
#yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
#yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
#yum install ansible -y
(3)rpm安装
# git clone git://github.com/ansible/ansible.git
# cd ./ansible
# make rpm
# rpm -Uvh ~/rpmbuild/ansible-*.noarch.rpm