--- # tasks file for epel - name: install epel gpg key rpm_key: key: "{{ epel_gpg_key }}" state: present when: - ansible_distribution in [ "Amazon", "CentOS", "RedHat" ] - name: install epel-release package: name: "{{ epel_url }}" state: present notify: - yum update cache when: - ansible_distribution in [ "Amazon", "CentOS", "RedHat" ]