Reputation: 310
I am trying to install a few packages on centos guest (which was spun through vagrant) through Ansible playbook. This is the snippet where I try to install
- 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
This is the error I receive. It's failing to get 'python-pip'
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"]}
Upvotes: 4
Views: 10622
Reputation: 791
I believe everything on your list is available from the default RHEL/CentOS repo except for python-pip, which I think you have to get from EPEL. Do you have the EPEL repo configured and enabled on the remote system?
Upvotes: 7