安装ansible
只需要将管理节点安装ansible ,被管理节点不需要安装
但如果使用yum安装的话,必须配置epel源
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5Server/x86_64/epel-release-5-4.noarch.rpm rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 安装依赖关系包
yum install python-dev python-yaml python-paramikopython-jinja2 git
使用yum安装absible
[root@node013 yum.repos.d]# yum installansible
Loaded plugins: fastestmirror, product-id,security, subscription-manager
This system is not registered to Red HatSubscription Management. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
*epel: mirrors.yun-idc.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ansible.noarch 0:1.7-1.el6will be installed
--> Processing Dependency:python-setuptools for package: ansible-1.7-1.el6.noarch
--> Processing Dependency: python-paramikofor package: ansible-1.7-1.el6.noarch
--> Processing Dependency: python-keyczarfor package: ansible-1.7-1.el6.noarch
--> Processing Dependency: python-httplib2for package: ansible-1.7-1.el6.noarch
--> Processing Dependency: python-crypto2.6for package: ansible-1.7-1.el6.noarch
--> Running transaction check
---> Package python-crypto2.6.x86_640:2.6.1-1.el6 will be installed
---> Package python-httplib2.noarch0:0.7.7-1.el6 will be installed
---> Package python-keyczar.noarch 0:0.71c-1.el6will be installed
--> Processing Dependency: python-pyasn1for package: python-keyczar-0.71c-1.el6.noarch
---> Package python-paramiko.noarch0:1.7.5-2.1.el6 will be installed
---> Package python-setuptools.noarch0:0.6.10-3.el6 will be installed
--> Running transaction check
---> Package python-pyasn1.noarch0:0.0.12a-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================
Package Arch Version Repository > ===============================================================================
Installing:
ansible noarch 1.7-1.el6 epel 874 k
Installing for dependencies:
python-crypto2.6 x86_64 2.6.1-1.el6 epel 530 k
python-httplib2 noarch 0.7.7-1.el6 epel 70 k
python-keyczar noarch 0.71c-1.el6 epel 219 k
python-paramiko noarch 1.7.5-2.1.el6 base 728 k
python-pyasn1 noarch 0.0.12a-1.el6 base 70 k
python-setuptools noarch 0.6.10-3.el6 base 336 k
Transaction Summary
===============================================================================
Install 7 Package(s)