From 8a608531a0d08129771ac92b52df17a50072d58d Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 20 Jun 2014 23:18:51 +0000 Subject: [PATCH] Add rhel7/epel7 to yumrepos task --- files/common/epel7.repo | 20 ++++++++++++++++++++ files/common/rhel7.repo | 14 ++++++++++++++ tasks/yumrepos.yml | 14 ++++++++++++-- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 files/common/epel7.repo create mode 100644 files/common/rhel7.repo diff --git a/files/common/epel7.repo b/files/common/epel7.repo new file mode 100644 index 0000000000..885edf7c06 --- /dev/null +++ b/files/common/epel7.repo @@ -0,0 +1,20 @@ +[epel] +name=Extras Packages for Enterprise Linux $releasever - $basearch +baseurl=http://infrastructure.fedoraproject.org/pub/epel/7/$basearch/ +enabled=0 +gpgcheck=1 +gpgkey=http://infrastructure.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7 + +[epel-testing] +name=Extras Packages for Enterprise Linux $releasever - $basearch +baseurl=http://infrastructure.fedoraproject.org/pub/epel/testing/7/$basearch/ +enabled=0 +gpgcheck=1 +gpgkey=http://infrastructure.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7 + +[epel-beta] +name=Extras Packages for Enterprise Linux beta $releasever - $basearch +baseurl=http://infrastructure.fedoraproject.org/pub/epel/beta/7/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=http://infrastructure.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7 diff --git a/files/common/rhel7.repo b/files/common/rhel7.repo new file mode 100644 index 0000000000..b81b504128 --- /dev/null +++ b/files/common/rhel7.repo @@ -0,0 +1,14 @@ +[rhel7-dvd] +name = rhel7 base dvd +baseurl=http://infrastructure.fedoraproject.org/repo/rhel/RHEL7-$basearch/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release + +[rhel7-base] +name = rhel7 base $basearch +baseurl=http://infrastructure.fedoraproject.org/repo/rhel/rhel7/$basearch/rhel-7-server-rpms +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release + +[rhel7-optional] +name = rhel7 optional $basearch +baseurl=http://infrastructure.fedoraproject.org/repo/rhel/rhel7/$basearch/rhel-7-server-optional-rpms +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release diff --git a/tasks/yumrepos.yml b/tasks/yumrepos.yml index 8230e6dfbb..b8805beaba 100644 --- a/tasks/yumrepos.yml +++ b/tasks/yumrepos.yml @@ -1,10 +1,20 @@ --- -- name: put rhel repos on system +- name: put rhel repos on rhel6 systems action: copy src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}" with_items: - epel6.repo - rhel6.repo - when: ansible_distribution == 'RedHat' + when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == 6 + tags: + - config + - packages + +- name: put rhel repos on rhel7 systems + action: copy src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}" + with_items: + - epel7.repo + - rhel7.repo + when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == 7 tags: - config - packages