ansible - 如何在 rhel 8 /centos 8 上安装 ansible?
问题描述
我想在 RHEL 8 Centos 中安装 ansible。要使用 yum install ansible 我必须启用 epel 发布,但我找不到 Rhel 8 的最佳 epel 发布来源。
我试过这个
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install ansible
我得到的输出是
Last metadata expiration check: 0:01:26 ago on Sun 11 Aug 2019 12:21:55 PM UTC.
Error:
Problem: conflicting requests
- nothing provides python-setuptools needed by ansible-2.8.2-1.el7.noarch
- nothing provides python-jinja2 needed by ansible-2.8.2-1.el7.noarch
- nothing provides python-six needed by ansible-2.8.2-1.el7.noarch
- nothing provides PyYAML needed by ansible-2.8.2-1.el7.noarch
- nothing provides python2-cryptography needed by ansible-2.8.2-1.el7.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
解决方案
如果您使用的是 RHEL 8,那么您可以使用订阅管理器来获取预先构建的主机和配置文件的 Ansible。
此外,您需要先在https://developers.redhat.com上创建一个帐户,然后才能执行此操作:
subscription-manager register --auto-attach
subscription-manager repos --enable ansible-2.8-for-rhel-8-x86_64-rpms
yum -y install ansible
ansible --version
推荐阅读
- java - 如何在 netBeans 的现有项目中使用 Aspose.Cells?
- objective-c - 从不兼容的类型分配
- java - Intellij:从 Maven 依赖运行 jar
- javascript - 这个奇怪的语法 [SOME_MUTATION] (state) 用于 JavaScript 中的函数定义是什么意思?
- powershell - 自托管的 powershell 没有实现字符串中的变量
- odoo - 如何在 odoo 9 中将组添加到 ir.actions.server?
- python - 如何在不添加“刻度”的情况下从下到上移动标签
- python - 尝试根据登录用户的用户名创建模型对象时出现 ValueError
- php - 如何使用 PHP 重新设置关联数组的键?
- python - 如何登录“https://github.com/NoMore201/googleplay-api”