ansible的安装

直接yum安装ansible会报错,需要先安装epel源。

ansible的安装来源于epel仓库,因此在安装前需确保安装了正确的epel源。

yum install -y epel-release
yum install -y ansible
[root@C8-1 misc]# yum -y install ansible
Last metadata expiration check: 0:00:29 ago on Tue 16 Jun 2020 04:29:04 PM EDT.
No match for argument: ansible
Error: Unable to find a match: ansible
[root@C8-1 misc]# ansible --version
-bash: ansible: command not found
[root@C8-1 misc]# yum install -y epel-release
CentOS-8 - AppStream 7.2 kB/s | 4.3 kB 00:00
CentOS-8 - Base 2.3 kB/s | 3.9 kB 00:01
CentOS-8 - Extras 3.1 kB/s | 1.5 kB 00:00
Dependencies resolved.
===================================================================================
Package Architecture Version Repository Size
===================================================================================
Installing:
epel-release noarch 8-8.el8 extras 23 k Transaction Summary
===================================================================================
Install 1 Package Total download size: 23 k
Installed size: 32 k
Downloading Packages:
epel-release-8-8.el8.noarch.rpm 53 kB/s | 23 kB 00:00
-----------------------------------------------------------------------------------
Total 27 kB/s | 23 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : epel-release-8-8.el8.noarch 1/1
Running scriptlet: epel-release-8-8.el8.noarch 1/1
Verifying : epel-release-8-8.el8.noarch 1/1 Installed:
epel-release-8-8.el8.noarch Complete!
[root@C8-1 misc]# yum info ansible
Extra Packages for Enterprise Linux Modular 8 - x8 19 kB/s | 119 kB 00:06
Extra Packages for Enterprise Linux 8 - x86_64 776 kB/s | 7.0 MB 00:09
Available Packages
Name : ansible
Version : 2.9.9
Release : 1.el8
Architecture : noarch
Size : 17 M
Source : ansible-2.9.9-1.el8.src.rpm
Repository : epel
Summary : SSH-based configuration management, deployment, and task execution
: system
URL : http://ansible.com
License : GPLv3+
Description : Ansible is a radically simple model-driven configuration management,
: multi-node deployment, and remote task execution system. Ansible
: works over SSH and does not require any software or daemons to be
: installed on remote nodes. Extension modules can be written in any
: language and are transferred to managed machines automatically. [root@C8-1 misc]# yum -y install ansible
Last metadata expiration check: 0:00:25 ago on Tue 16 Jun 2020 05:06:21 PM EDT.
Dependencies resolved.
===================================================================================
Package Arch Version Repo Size
===================================================================================
Installing:
ansible noarch 2.9.9-1.el8 epel 17 M
Upgrading:
platform-python-pip noarch 9.0.3-16.el8 BaseOS 1.8 M
Installing dependencies:
python3-babel noarch 2.5.1-5.el8 AppStream 4.8 M
python3-jinja2 noarch 2.10.1-2.el8_0 AppStream 538 k
python3-jmespath noarch 0.9.0-11.el8 AppStream 45 k
python3-markupsafe x86_64 0.23-19.el8 AppStream 39 k
python3-pip noarch 9.0.3-16.el8 AppStream 19 k
python3-pyasn1 noarch 0.3.7-6.el8 AppStream 126 k
python3-pytz noarch 2017.2-9.el8 AppStream 54 k
python36 x86_64 3.6.8-2.module_el8.1.0+245+c39af44f AppStream 19 k
python3-setuptools noarch 39.2.0-5.el8 BaseOS 162 k
libsodium x86_64 1.0.18-2.el8 epel 162 k
python3-bcrypt x86_64 3.1.6-2.el8.1 epel 44 k
python3-pynacl x86_64 1.3.0-5.el8 epel 100 k
sshpass x86_64 1.06-9.el8 epel 27 k
Installing weak dependencies:
python3-paramiko noarch 2.4.3-1.el8 epel 289 k
Enabling module streams:
python36 3.6 Transaction Summary
===================================================================================
Install 15 Packages
Upgrade 1 Package Total download size: 25 M
Downloading Packages:
(1/16): python3-jmespath-0.9.0-11.el8.noarch.rpm 424 kB/s | 45 kB 00:00
(2/16): python3-markupsafe-0.23-19.el8.x86_64.rpm 543 kB/s | 39 kB 00:00
(3/16): python3-pip-9.0.3-16.el8.noarch.rpm 580 kB/s | 19 kB 00:00
(4/16): python3-pyasn1-0.3.7-6.el8.noarch.rpm 583 kB/s | 126 kB 00:00
(5/16): python3-pytz-2017.2-9.el8.noarch.rpm 1.0 MB/s | 54 kB 00:00
(6/16): python36-3.6.8-2.module_el8.1.0+245+c39af4 250 kB/s | 19 kB 00:00
(7/16): python3-jinja2-2.10.1-2.el8_0.noarch.rpm 745 kB/s | 538 kB 00:00
(8/16): python3-setuptools-39.2.0-5.el8.noarch.rpm 775 kB/s | 162 kB 00:00
(9/16): python3-babel-2.5.1-5.el8.noarch.rpm 2.4 MB/s | 4.8 MB 00:01
(10/16): python3-bcrypt-3.1.6-2.el8.1.x86_64.rpm 118 kB/s | 44 kB 00:00
(11/16): libsodium-1.0.18-2.el8.x86_64.rpm 89 kB/s | 162 kB 00:01
(12/16): python3-pynacl-1.3.0-5.el8.x86_64.rpm 674 kB/s | 100 kB 00:00
(13/16): sshpass-1.06-9.el8.x86_64.rpm 71 kB/s | 27 kB 00:00
(14/16): platform-python-pip-9.0.3-16.el8.noarch.r 4.6 MB/s | 1.8 MB 00:00
(15/16): python3-paramiko-2.4.3-1.el8.noarch.rpm 92 kB/s | 289 kB 00:03
(16/16): ansible-2.9.9-1.el8.noarch.rpm 976 kB/s | 17 MB 00:18
-----------------------------------------------------------------------------------
Total 982 kB/s | 25 MB 00:26
warning: /var/cache/dnf/epel-6519ee669354a484/packages/ansible-2.9.9-1.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
Extra Packages for Enterprise Linux 8 - x86_64 1.6 MB/s | 1.6 kB 00:00
Importing GPG key 0x2F86D6A1:
Userid : "Fedora EPEL (8) <epel@fedoraproject.org>"
Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : python3-setuptools-39.2.0-5.el8.noarch 1/17
Upgrading : platform-python-pip-9.0.3-16.el8.noarch 2/17
Installing : python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 3/17
Running scriptlet: python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 3/17
Installing : python3-pip-9.0.3-16.el8.noarch 4/17
Installing : sshpass-1.06-9.el8.x86_64 5/17
Installing : python3-bcrypt-3.1.6-2.el8.1.x86_64 6/17
Installing : libsodium-1.0.18-2.el8.x86_64 7/17
Installing : python3-pynacl-1.3.0-5.el8.x86_64 8/17
Installing : python3-pytz-2017.2-9.el8.noarch 9/17
Installing : python3-babel-2.5.1-5.el8.noarch 10/17
Installing : python3-pyasn1-0.3.7-6.el8.noarch 11/17
Installing : python3-paramiko-2.4.3-1.el8.noarch 12/17
Installing : python3-markupsafe-0.23-19.el8.x86_64 13/17
Installing : python3-jinja2-2.10.1-2.el8_0.noarch 14/17
Installing : python3-jmespath-0.9.0-11.el8.noarch 15/17
Installing : ansible-2.9.9-1.el8.noarch 16/17
Cleanup : platform-python-pip-9.0.3-15.el8.noarch 17/17
Running scriptlet: platform-python-pip-9.0.3-15.el8.noarch 17/17
Verifying : python3-babel-2.5.1-5.el8.noarch 1/17
Verifying : python3-jinja2-2.10.1-2.el8_0.noarch 2/17
Verifying : python3-jmespath-0.9.0-11.el8.noarch 3/17
Verifying : python3-markupsafe-0.23-19.el8.x86_64 4/17
Verifying : python3-pip-9.0.3-16.el8.noarch 5/17
Verifying : python3-pyasn1-0.3.7-6.el8.noarch 6/17
Verifying : python3-pytz-2017.2-9.el8.noarch 7/17
Verifying : python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64 8/17
Verifying : python3-setuptools-39.2.0-5.el8.noarch 9/17
Verifying : ansible-2.9.9-1.el8.noarch 10/17
Verifying : libsodium-1.0.18-2.el8.x86_64 11/17
Verifying : python3-bcrypt-3.1.6-2.el8.1.x86_64 12/17
Verifying : python3-paramiko-2.4.3-1.el8.noarch 13/17
Verifying : python3-pynacl-1.3.0-5.el8.x86_64 14/17
Verifying : sshpass-1.06-9.el8.x86_64 15/17
Verifying : platform-python-pip-9.0.3-16.el8.noarch 16/17
Verifying : platform-python-pip-9.0.3-15.el8.noarch 17/17 Upgraded:
platform-python-pip-9.0.3-16.el8.noarch Installed:
ansible-2.9.9-1.el8.noarch
python3-paramiko-2.4.3-1.el8.noarch
python3-babel-2.5.1-5.el8.noarch
python3-jinja2-2.10.1-2.el8_0.noarch
python3-jmespath-0.9.0-11.el8.noarch
python3-markupsafe-0.23-19.el8.x86_64
python3-pip-9.0.3-16.el8.noarch
python3-pyasn1-0.3.7-6.el8.noarch
python3-pytz-2017.2-9.el8.noarch
python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64
python3-setuptools-39.2.0-5.el8.noarch
libsodium-1.0.18-2.el8.x86_64
python3-bcrypt-3.1.6-2.el8.1.x86_64
python3-pynacl-1.3.0-5.el8.x86_64
sshpass-1.06-9.el8.x86_64 Complete!

检查ansible版本

[root@C8-1 ~]# type ansible
ansible is /usr/bin/ansible
[root@C8-1 ~]# ansible --version
ansible 2.9.9
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.8 (default, Nov 21 2019, 19:31:34) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)]

CentOS 8 Yum安装ansible的更多相关文章

  1. centos'的yum安装php的memcache扩展

    centos'的yum安装php的memcache扩展 博客分类: linux   让php能使用memcached服务的扩展有两种:memcache 和 memcached 1. 先安装libmem ...

  2. centOS下yum安装配置samba

     centOS下yum安装配置samba 2010-03-29 15:46:00 标签:samba yum centOS 安装 休闲 注意:本文的原则是只将文件共享应用于内网服务器,并让将要被共享的目 ...

  3. centos下yum安装crontab+mysql自动备份

    参考博文: centos下yum安装crontab yum install vixie-cron crontabs      //安装 chkconfig crond on               ...

  4. Linux Centos 使用 yum 安装java

    centos 使用 yum 安装java 首先,在你的服务器上运行一下更新. yum update 然后,在您的系统上搜索,任何版本的已安装的JDK组件. rpm -qa | grep -E '^op ...

  5. <亲测>CentOS中yum安装ffmpeg

    CentOS中yum安装ffmpeg 1.升级系统 sudo yum install epel-release -y sudo yum update -y sudo shutdown -r now 2 ...

  6. 在Centos中yum安装和卸载软件的使用方法(转)

    在Centos中yum安装和卸载软件的使用方法 安装方法 安装一个软件时 yum -y install httpd 安装多个相类似的软件时 yum -y install httpd* 安装多个非类似软 ...

  7. [转载]centos下yum安装samba及配置

    centos下yum安装samba及配置 在我们使用 Windows 作为客户机的时候,通常有文件.打印共享的需求.作为Windows 网络功能之一,通常可以在 Windows 客户机之间通过Wind ...

  8. 在Centos中yum安装和卸载软件的使用方法(转载)

    转自: http://gzmaster.blog.51cto.com/299556/72278 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任. ...

  9. centos下yum安装lamp和lnmp轻松搞定

    centos下yum安装lamp和lnmp轻松搞定.究竟多轻松你看就知道了.妈妈再也不操心不会装lamp了. 非常辛苦整理的安装方法,会持续更新下去.凡无法安装的在评论里贴出问题来,会尽快解决.共同维 ...

随机推荐

  1. C#开发PACS医学影像处理系统(十五):Dicom影像交叉定位线算法

    1.定位线概念:某个方位的影像在另一个方向的影像上的投影相交线,例如横断面(从头到脚的方向)在矢状面(从左手到右手)上的影像投影面交线. 举个例子:右边的是MR(核磁共振)的某一帧切片,这是从头开始扫 ...

  2. 【转】Locust-工具核心原理分析

    Locust工具在市场上不如Loadrunner / JMeter流行,使用的范围也没有那么广,但不可否认其是一款很不错的工具.我个人觉得Locust使用不是那么广泛,主要是因为一下方式: Locus ...

  3. Asp.Net Core Log4Net 配置分多个文件记录日志(不同日志级别)

    本文所有配置都是在core3.1环境下. 首先看看最终的效果. 请求监控:对每次请求的相关信息做一个记录. 全局异常:我不想我的错误信息,跟其他的信息混合在一起,查看的时候不大方便. 应用日志:这个主 ...

  4. PyCharm专业版编辑器安装(含破解步骤)

    一.首先下载好安装包: 二.安装步骤: 1.双击安装包,打开安装界面,点击"next": 2.选择安装路径,点击"next": 3.电脑是64位的就勾选64-b ...

  5. 微服务实战系列(十)-网关高可用之中间件Keepalived

    1.场景描述 因为要做网关的高可用,用到了keepalived+nginx,来保证nginx的高可用,如下图: 安装了keepavlived,走了一些弯路,记录下吧,nginx的安装就不多说了,博客已 ...

  6. 使用Redis做消息队列

    基于内存的单线程数据库,使Redis的线程安全性极高.而Redis的双向链表数据类型(List)天生就可作为消息队列存储消息. 在这里就不说消息队列的等等一些优点.但是补充一下Redis的List类型 ...

  7. centos7安装YouCompleteMe,vim打造成C++的IDE

    一.安装python3 1.安装编译工具 yum -y groupinstall "Development tools" yum -y install zlib-devel bzi ...

  8. 实验一 C运行环境与最简单的程序设计

    实验一: #include<stdio.h> int main() {   int a1,a2;   int sum;   a1 =123;   a2 = 456;   sum = a1+ ...

  9. matlab中wvtool

    参考:https://ww2.mathworks.cn/help/signal/ref/wvtool.html?searchHighlight=wvtool&s_tid=doc_srchtit ...

  10. Ubuntu18.04修改apt-get源

    1)备份源文件: sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 2)查看版本信息 如是Linux Mint等Ubuntu衍生版,执行: ...