艾尔文森林

导航

Ansible小结(一)---安装ansible

系统环境

cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core)

软件版本

ansible-2.5.3-1.el7.noarch 

 

安装Ansible

1、ansible一般在epel源中提供,首先配置epel源

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache

2、yum方式安装ansible

yum install ansible
...

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                                    Arch                                                         Version                                                           Repository                                                    Size
==============================================================================================================================================================================================================================================================================
Installing:
 ansible                                                                    noarch                                                       2.5.3-1.el7                                                       epel                                                         9.0 M
Installing for dependencies:
 python-cffi                                                                x86_64                                                       1.6.0-5.el7                                                       base                                                         218 k
 python-enum34                                                              noarch                                                       1.0.4-1.el7                                                       base                                                          52 k
 python-httplib2                                                            noarch                                                       0.9.2-1.el7                                                       extras                                                       115 k
 python-idna                                                                noarch                                                       2.4-1.el7                                                         base                                                          94 k
 python-keyczar                                                             noarch                                                       0.71c-2.el7                                                       epel                                                         218 k
 python-paramiko                                                            noarch                                                       2.1.1-4.el7                                                       extras                                                       268 k
 python-ply                                                                 noarch                                                       3.4-11.el7                                                        base                                                         123 k
 python-pycparser                                                           noarch                                                       2.14-1.el7                                                        base                                                         104 k
 python-setuptools                                                          noarch                                                       0.9.8-7.el7                                                       base                                                         397 k
 python2-cryptography                                                       x86_64                                                       1.7.2-2.el7                                                       base                                                         502 k
 python2-jmespath                                                           noarch                                                       0.9.0-3.el7                                                       extras                                                        39 k
 python2-pyasn1                                                             noarch                                                       0.1.9-7.el7                                                       base                                                         100 k
 sshpass 
...

Installed:
ansible.noarch 0:2.5.3-1.el7

Dependency Installed:
python-cffi.x86_64 0:1.6.0-5.el7 python-enum34.noarch 0:1.0.4-1.el7 python-httplib2.noarch 0:0.9.2-1.el7 python-idna.noarch 0:2.4-1.el7 python-keyczar.noarch 0:0.71c-2.el7 python-paramiko.noarch 0:2.1.1-4.el7 python-ply.noarch 0:3.4-11.el7
python-pycparser.noarch 0:2.14-1.el7 python-setuptools.noarch 0:0.9.8-7.el7 python2-cryptography.x86_64 0:1.7.2-2.el7 python2-jmespath.noarch 0:0.9.0-3.el7 python2-pyasn1.noarch 0:0.1.9-7.el7 sshpass.x86_64 0:1.06-2.el7

Complete!

 

3、客户端安装libselinux-pytho

yum install libselinux-python -y
Loaded plugins: fastestmirror, langpacks
...

==============================================================================================================================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================================================================================================================
Updating:
libselinux-python x86_64 2.5-12.el7 base 235 k
Updating for dependencies:
libselinux x86_64 2.5-12.el7 base 162 k
libselinux-utils x86_64 2.5-12.el7 base 151 k

Transaction Summary
==============================================================================================================================================================================================================================================================================
Upgrade 1 Package (+2 Dependent packages)

Total download size: 548 k
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/3): libselinux-utils-2.5-12.el7.x86_64.rpm | 151 kB 00:00:02
(2/3): libselinux-2.5-12.el7.x86_64.rpm | 162 kB 00:00:03
(3/3): libselinux-python-2.5-12.el7.x86_64.rpm | 235 kB 00:00:04
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

...

Updated:

libselinux-python.x86_64 0:2.5-12.el7

Dependency Updated:
libselinux.x86_64 0:2.5-12.el7 libselinux-utils.x86_64 0:2.5-12.el7

Complete!

 

至此,控制机和客户端需要安装的软件已安装完毕。

posted on 2018-05-22 10:37  艾尔文森林  阅读(1326)  评论(0编辑  收藏  举报