我正在尝试安装几个软件包在centos的客人(这是通过流浪)通过Ansible游戏。这是我试图安装的片段
- name: Installing helpful tools and packages
yum:
pkg: "{{ item }}"
state: present
with_items:
- ntp
- tcpdump
- policycoreutils-python
- vim
- vim-X11
- yum-utils
- deltarpm
- git
- ntp
- python-pip
- pip
when:
- ansible_os_family == "RedHat"
- name: Install shade using pip.
#become: yes
pip:
name: "{{ item }}"
state: present
with_items:
- pip
- shade这是我收到的错误。它没能得到‘python’
TASK [prep : Installing helpful tools and packages]
****************************
failed: [default] (item=[u'ntp', u'tcpdump', u'policycoreutils-python',
u'vim', u'vim-X11', u'yum-utils', u'deltarpm', u'git', u'ntp',
u'python-devel', u'python-pip', u'pip']) => {"changed": false,
"failed": true, "item": ["ntp", "tcpdump", "policycoreutils-python",
"vim", "vim-X11", "yum-utils", "deltarpm", "git", "ntp", "python-
devel", "python-pip", "pip"], "msg": "No package matching 'python-pip'
found available, installed or updated", "rc": 126, "results": ["yum-
utils-1.1.31-42.el7.noarch providing yum-utils is already installed",
"deltarpm-3.6-3.el7.x86_64 providing deltarpm is already installed",
"No package matching 'python-pip' found available, installed or
updated"]}发布于 2017-12-13 16:59:23
我相信列表中的所有内容都可以从默认的RHEL/CentOS回购中获得,除了python之外,我认为您必须从EPEL获得。您是否在远程系统上配置并启用了EPEL回购?
https://stackoverflow.com/questions/47797231
复制相似问题