I think you can avoid this altogether.

I believe there's an epel-release package in the main yum repo which you 
can use to add EPEL to your yum sources (may not have the right terminology 
here).

- name: ADD EPEL release using a yum package to do so
  yum:
    name: epel-release
    state: present

Hope this helps,

Jon
On Wednesday, May 25, 2016 at 9:58:24 PM UTC+1, Adam Morris wrote:
>
> Greetings,
>
> I have a playbook which includes this piece...
>
> - name: Install the appropriate EPEL package for RHEL/OEL
>   package: name="
> https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ 
> ansible_distribution_major_version }}.noarch.rpm" state=latest
>   when: ansible_distribution == "RedHat" or ansible_distribution == 
> "Oracle"
>
> When run I get this error message
>
> TASK [EPEL : Install the appropriate EPEL package for RHEL/OEL] 
> ****************
> fatal: [host]: FAILED! => {"changed": false, "failed": true, "msg": "No 
> Package matching '
> https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm' 
> found available, installed or updated", "rc": 0, "results": []}
>
> If I run it on the target server manually I get
>
> yum install 
> https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
> Loaded plugins: product-id, search-disabled-repos, subscription-manager
> epel-release-latest-7.noarch.rpm                         |  14 kB     
> 00:00     
> Examining /var/tmp/yum-root-NZVCS_/epel-release-latest-7.noarch.rpm: 
> epel-release-7-6.noarch
> Marking /var/tmp/yum-root-NZVCS_/epel-release-latest-7.noarch.rpm to be 
> installed
> Resolving Dependencies
> blahblahblah
>
> I'm running Ansible 2.0.2.0
>
> Any ideas?
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e5b9acbc-de74-4869-be15-376ab2f9074f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to