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. SpringBoot-01-快速入门

    SpringBoot 1. 快速入门 什么是Spring 轻量级的Java开源开发框架 为了解决企业级应用开发的复杂性而创建的,简化开发 Spring是如何简化Java开发的 ​ 为了降低Java开发 ...

  2. Redis底层数据结构详解

    上一篇说了Redis有五种数据类型,今天就来聊一下Redis底层的数据结构是什么样的.是这一周看了<redis设计与实现>一书,现来总结一下.(看书总是非常烦躁的!) Redis是由C语言 ...

  3. Github 个人首页的 README,这样玩儿~

    本文首发于 Ficow Shen's Blog,原文地址: Github 个人首页的 README,这样玩儿~. 内容概览 前言 创建仓库 修改 README 的内容 总结 前言 大家最近有没有发现这 ...

  4. vscode链接git拉取项目

    vscode终端中就可操作 初始化 git  init 链接 git git remote add origin http://**************.git 拉取项目 git clone ht ...

  5. ucore操作系统学习笔记(一) ucore lab1系统启动流程分析

    一.ucore操作系统介绍 操作系统作为一个基础系统软件,对下控制硬件(cpu.内存.磁盘网卡等外设),屏蔽了底层复杂多样的硬件差异:对上则提供封装良好的应用程序接口,简化应用程序开发者的使用难度.站 ...

  6. java学习网站汇总

    1.https://blog.csdn.net/qq_35571554/article/details/82759668 B+树原理漫画讲解2.https://blog.csdn.net/moakun ...

  7. C# lock 死锁问题排查方法

    多线程程序发生死锁,某些重要线程卡住,不正常工作.排查起来非常麻烦.以下内容记录排查方法 1.确定死锁的位置,一般死锁会lock到某一行具体的代码,比如我就死锁在类似如下代码中 public void ...

  8. Python练习题 041:Project Euler 013:求和、取前10位数值

    本题来自 Project Euler 第13题:https://projecteuler.net/problem=13 # Project Euler: Problem 13: Large sum # ...

  9. 星涛:采用java递归复制文件夹

    package com.botao; import java.io.*; /** * @author cbt28 */ public class FileUtil { public static St ...

  10. C\C++中计时、延时函数

    转载:https://blog.csdn.net/keith_bb/article/details/53055380 C\C++标准库中提供了两种计时函数clock()和time().其用法如下:(1 ...