This is the snippet that worked for me, in case anyone experiences the same 
problem:

*# Extra Packages for Enterprise Linux (EPEL)*
*- name: Extra Packages for Enterprise Linux (EPEL)*
*  yum: name=epel-release state=latest*
*- name: EPEL repository key *
*  rpm_key:*
*    key: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ 
ansible_distribution_major_version }}"*
*    state: present*

On Monday, May 9, 2016 at 1:23:12 PM UTC-6, Johannes Kastl wrote:
>
> On 09.05.16 17:29 Tim Griffin wrote: 
> > Ah, okay. Good point, Johannes. 
> > 
> > And, on RHEL, turning of the GPG check wouldn't be a good plan anyways! 
>
> On CentOS-machines I use this snippet to install the epel-release 
> package and import the rpm-key: 
>
> - name: CentOS - install epel-release 
>   yum: name=epel-release state=latest 
>   when: ansible_os_family == "RedHat" 
>
> - name: CentOS - install epel-release Key 
>   rpm_key: key="/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ 
> ansible_distribution_major_version }}" state=present 
>   when: ansible_os_family == "RedHat" 
>
> Johannes 
>
>

-- 
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/5c180d8d-8514-4a31-bd72-d72c31d590fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to