On 25 May 2016 at 16:58, Adam Morris <[email protected]> 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?
>

I think it is telling you literally what is wrong. It is trying to
install a package named:
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
which it isn't finding in any of the yum repositories it knows about.
I think you need to do this in a two stage process.

1) Download the file from
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
2) Then install the file.

-- 
Stephen J Smoogen.

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CANnLRdhL_gQQfAUrvvhmMAysYga2Zjf8EXhTajdt4hRtPXv1sg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to