main.yml 653 B

1234567891011121314151617181920212223242526
  1. ---
  2. - name: "Test if EPEL ist necessary"
  3. fail: msg="This system does not need EPEL"
  4. when: ansible_os_family != "RedHat" or ansible_distribution == "Fedora"
  5. - name: Update CA-Certificates
  6. yum:
  7. name: ca-certificates
  8. state: latest
  9. - name: Template /etc/yum.repos.d/epel.repo
  10. template:
  11. src: "epel.repo.j2"
  12. dest: "/etc/yum.repos.d/epel.repo"
  13. backup: yes
  14. - name: "Copy /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
  15. copy:
  16. src: "RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
  17. dest: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
  18. force: no