Skip to content

Instantly share code, notes, and snippets.

@gregbuehler
Created December 27, 2013 20:57
Show Gist options
  • Save gregbuehler/8152527 to your computer and use it in GitHub Desktop.
Save gregbuehler/8152527 to your computer and use it in GitHub Desktop.
- name: Check if EPEL is installed
shell: yum repolist | grep epel | wc -l
register: epel_installed
- name: Install EPEL5 package
yum: name={epel5_rpm} state=installed
when: (epel_installed == 0) and (ansible_distribution_version.find('5.') != -1)
- name: Install EPEL6 package
yum: name={epel6_rpm} state=installed
when: (epel_installed == 0) and (ansible_distribution_version.find('6.') != -1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment