- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是我尝试在具有操作系统 Centos-7 的节点上运行的 YAMLcode 的一部分......
文件层次结构是
--> 角色/install_tools/tasks/main.yml
它不能正常工作,YAML 语法也有效且正确!
有人可以帮我吗?
---
- name: install the Development tools package group
yum:
name: "@Development tools"
state: present
- name: Install common software requirements
ignore_errors: yes
become: true
yum: pkg={{ item }} state=present
with_items:
- yum-plugin-fastestmirror
- epel-release
- git
- libyaml-devel
- libnet-devel
- libnetfilter_queue-devel
- libpcap-devel
- pcre-devel
- file-devel
- jansson-devel
- nss-devel
- libcap-ng-devel
- lua-devel
- binutils
- gmp
- gmp-devel
- make
- ld
- glibc.i686
- python-pip
- perl-Sys-Syslog
- readline-devel
- ncurses-devel
- openssl-devel
- easy-rsa
- flex
- bison
- pcre
- zlib
- zlib-devel
- libpcap
- libdnet
- libdnet-devel
- m4
- gcc
- mysql-devel
- python-devel
- geoip
- geoip-devel
- libffi-devel
- vim
- lsof
- wget
- mlocate
- htop
- net-tools
- traceroute
- tcpdump
- radiusclient-ng.x86_64
- gmp-devel
- iptables-services
- dnsmasq
- pptpd
- mariadb-devel
- lzo-devel.x86_64
- crontabs
- gcc
- make
- rpm-build
- autoconf.noarch
- zlib-devel
- pam-devel
- openssl-devel
TASK [install_tools : Install common software requirements] ***********************
failed: [meracentos] (item=[u'yum-plugin-fastestmirror', u'epel-release', u'git', u'libyaml-devel', u'libnet-devel', u'libnetfilter_queue-devel', u'libpcap-devel', u'pcre-devel', u'file-devel', u'jansson-devel', u'nss-devel', u'libcap-ng-devel', u'lua-devel', u'binutils', u'gmp', u'gmp-devel', u'make', u'ld', u'glibc.i686', u'python-pip', u'perl-Sys-Syslog', u'readline-devel', u'ncurses-devel', u'openssl-devel', u'easy-rsa', u'flex', u'bison', u'pcre', u'zlib', u'zlib-devel', u'libpcap', u'libdnet', u'libdnet-devel', u'm4', u'gcc', u'mysql-devel', u'python-devel', u'geoip', u'geoip-devel', u'libffi-devel', u'vim', u'lsof', u'wget', u'mlocate', u'htop', u'net-tools', u'traceroute', u'tcpdump', u'radiusclient-ng.x86_64', u'gmp-devel', u'iptables-services', u'dnsmasq', u'pptpd', u'mariadb-devel', u'lzo-devel.x86_64', u'crontabs', u'gcc', u'make', u'rpm-build', u'autoconf.noarch', u'zlib-devel', u'pam-devel', u'openssl-devel']) => {"changed": false, "failed": true, "item": ["yum-plugin-fastestmirror", "epel-release", "git", "libyaml-devel", "libnet-devel", "libnetfilter_queue-devel", "libpcap-devel", "pcre-devel", "file-devel", "jansson-devel", "nss-devel", "libcap-ng-devel", "lua-devel", "binutils", "gmp", "gmp-devel", "make", "ld", "glibc.i686", "python-pip", "perl-Sys-Syslog", "readline-devel", "ncurses-devel", "openssl-devel", "easy-rsa", "flex", "bison", "pcre", "zlib", "zlib-devel", "libpcap", "libdnet", "libdnet-devel", "m4", "gcc", "mysql-devel", "python-devel", "geoip", "geoip-devel", "libffi-devel", "vim", "lsof", "wget", "mlocate", "htop", "net-tools", "traceroute", "tcpdump", "radiusclient-ng.x86_64", "gmp-devel", "iptables-services", "dnsmasq", "pptpd", "mariadb-devel", "lzo-devel.x86_64", "crontabs", "gcc", "make", "rpm-build", "autoconf.noarch", "zlib-devel", "pam-devel", "openssl-devel"], "msg": "No package matching 'ld' found available, installed or updated", "rc": 126, "results": ["yum-plugin-fastestmirror-1.1.31-40.el7.noarch providing yum-plugin-fastestmirror is already installed", "git-1.8.3.1-6.el7_2.1.x86_64 providing git is already installed", "binutils-2.25.1-22.base.el7.x86_64 providing binutils is already installed", "gmp-1:6.0.0-12.el7_1.x86_64 providing gmp is already installed", "make-1:3.82-23.el7.x86_64 providing make is already installed", "No package matching 'ld' found available, installed or updated"]}
最佳答案
使用 with_items
ansible yum 现在已弃用。您应该将列表传递给 name:
如下;
- name: Install common software requirements
become: true
yum:
state: present
name:
- yum-plugin-fastestmirror
- epel-release
- git
- libyaml-devel
- libnet-devel
- libnetfilter_queue-devel
- libpcap-devel
- pcre-devel
- file-devel
- jansson-devel
- nss-devel
- libcap-ng-devel
- lua-devel
- binutils
- gmp
- gmp-devel
- make
- ld
- glibc.i686
- python-pip
- perl-Sys-Syslog
- readline-devel
- ncurses-devel
- openssl-devel
- easy-rsa
Invoking "yum" only once while using a loop via squash_actions is deprecated. Instead of using a loop to supply multiple items and specifying `name: {{ item }}`,
关于ansible - 通过 Ansible 在 Centos(节点)上安装多个 yum 包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44019836/
使用 yum 的优先级插件时,会显示已排除的软件包数量。有没有办法显示这些包的名称? 最佳答案 你总是可以像这样运行 yum: yum -d 9 install foo 并且部分日志输出是排除包。 编
我尝试使用命令 make && make install 安装 yum-3.4.3,但失败并显示以下日志: infra-bld4:/tmp/hxu2/yum-3.4.3> make for d in
我在 CentOs 8 上运行以下命令 $ cat /etc/redhat-release CentOS Linux release 8.2.2004 (Core) 我从一个干净且更新的 yum 数据
我知道 FI-WARE 在 http://repositories.testbed.fiware.org/ 提供了一个公共(public) yum 存储库可用于安装 FI-WARE 软件包,例如 Or
如何将 yum 存储库完全导入 Artifactory? 请注意,我指的是外部 yum存储库,并且由于在 Artifactory 中实现外部存储库镜像的方式,我无法使用 artifactory-rem
当我在 shell 中使用 yum 时,错误消息是没有名为 yum 的模块,所以我编辑/usr/bin/yum 将第一行更改为另一个版本的 python,但没有任何变化,当我使用不同的 python
我正在按照可以在此处找到的教程在 ec2 实例上设置 headless Selenium 刮刀: https://krbnite.github.io/Driving-Headless-Chrome-w
我们在我们公司使用自定义的 yum 存储库。某些事情导致他们失败 yum makecache命令。 我在 CentOS Linux release 7.7.1908 (Core) . 这是我们在运行
我正在尝试使用 RPM 升级软件包。我如何知道它是全新安装还是更新。是否有任何我可以检查的标志,或者我应该编写一个脚本来检查它是全新安装还是升级? 最佳答案 如果我很好地理解你的问题;我想你自己打包
在 Debian 衍生版中,在使用 apt-get install xxx 从 apt 安装软件之前,需要运行apt-get update .这会刷新包列表,以便正确解析依赖项等。 在使用 RHEL
我正在编写一个更新本地存储库 URL 的 yum 插件。当 repo URL 更改时,我想让 yum 运行 yum clean all 以确保没有缓存过时的信息。我知道当 yum clean [plu
许多 makefile 使用 pkg-config,但名称与包管理器无关(例如 yum/apt)。如何将 pkg-config 名称映射到它们?有什么窍门吗? 示例:如果我执行 yum searchN
我对 Linux 和 VDS 完全陌生。 VDS的操作系统是CentOS 6.9。我正在尝试安装apache、邮件服务器、php、mysql等。但我认为,要能够安装这些 'yum update' 或
当我执行 yum 时,像这样搜索 mysql-libs: $sudo yum search mysql-libs Loaded plugins: branch, downloadonly, faste
我在 CentOS 上使用 MySQL-Server。我 'yum remove' MySQL 服务器,然后再次 'yum install' 它。当我尝试使用 'mysqladmin' 为 'root
我见过两种安装包的方式,比如CentOS上的squid: 1.yum -y install squid 2.yum install squid 谁能告诉我它们之间有什么区别?另外,我使用的是 Cent
提示我出现以下错误 不匹配参数:python-devel 最佳答案 python2.7现在已经完全过时了。你应该和 python3 一起工作.因此你可以安装: dnf install python3-
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
尝试从任何存储库更新任何包时,很难找到导致以下错误的原因。我通过将所有其他人设置为禁用来测试多个 repo 协议(protocol)。我已经清理了所有缓存并删除了所有 dnf yum 缓存文件。 #
我已经在我的 VMServer 上部署了一个新的 CentOS 6.5 实例,其中安装了开发工具、X11 和其他几个软件包。第一天,似乎一切正常。后来我无法使用 yum 安装程序来更新或安装任何软件包
我是一名优秀的程序员,十分优秀!