From 7d74d1913274cba4c4732cbc5f0a573cb99e5248 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Thu, 12 Feb 2015 11:26:56 -0700 Subject: - Rename minion to node - Update playbooks to support latest code --- roles/repos/tasks/main.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'roles/repos/tasks') diff --git a/roles/repos/tasks/main.yaml b/roles/repos/tasks/main.yaml index 3b66bb392..cb4b5ad40 100644 --- a/roles/repos/tasks/main.yaml +++ b/roles/repos/tasks/main.yaml @@ -10,4 +10,7 @@ copy: src=epel7-kubernetes.repo dest=/etc/yum.repos.d/epel7-kubernetes.repo - name: Ensure the origin repo is available - copy: src=epel7-origin.repo dest=/etc/yum.repos.d/epel7-origin.repo + copy: src=epel7-openshift.repo dest=/etc/yum.repos.d/epel7-openshift.repo + +- name: Ensure the rhel repo is available + copy: src=oso-rhui-rhel-7-server.repo dest=/etc/yum.repos.d/oso-rhui-rhel-7-server.repo -- cgit v1.2.3 From 5825d847da539256de3a7e4eef2dcbc38c198d0a Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Tue, 17 Feb 2015 08:37:32 -0600 Subject: remove the add-hoc docker repo Fix up libra candidate repo config file Fix up rhel 7 rhui repo config file Add rhel 7 rhui extras repo, which has docker in it Separate rhel 7 extras into its own config file Add rhel 7 extras so that we have docker --- roles/repos/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/repos/tasks') diff --git a/roles/repos/tasks/main.yaml b/roles/repos/tasks/main.yaml index 3b66bb392..e5c9a7f92 100644 --- a/roles/repos/tasks/main.yaml +++ b/roles/repos/tasks/main.yaml @@ -3,8 +3,8 @@ - name: Ensure rhel 7 libra candidate exists in yum.repos.d copy: src=rhel-7-libra-candidate.repo dest=/etc/yum.repos.d/rhel-7-libra-candidate.repo -- name: Ensure a docker repo is laid down - copy: src=docker.repo dest=/etc/yum.repos.d/docker.repo +- name: Ensure rhel 7 extras exists in yum.repos.d + copy: src=oso-rhui-rhel-7-extras.repo dest=/etc/yum.repos.d/oso-rhui-rhel-7-extras.repo - name: Ensure the kubernetes repo is available copy: src=epel7-kubernetes.repo dest=/etc/yum.repos.d/epel7-kubernetes.repo -- cgit v1.2.3 From 12ec90897f890e1f5ee417d9f6f56baa359f0313 Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Fri, 20 Feb 2015 23:52:21 -0500 Subject: Repo role refactor to add enterprise support - Add openshift_additional_repos config that allows for setting custom repos - cleanup yum repos that were configured for other deployment types --- roles/repos/tasks/main.yaml | 47 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) (limited to 'roles/repos/tasks') diff --git a/roles/repos/tasks/main.yaml b/roles/repos/tasks/main.yaml index a6a80581e..43786da41 100644 --- a/roles/repos/tasks/main.yaml +++ b/roles/repos/tasks/main.yaml @@ -1,16 +1,41 @@ --- -# The following role lays down the correct repository and gpg key for yum -- name: Ensure rhel 7 libra candidate exists in yum.repos.d - copy: src=rhel-7-libra-candidate.repo dest=/etc/yum.repos.d/rhel-7-libra-candidate.repo +# TODO: Add flag for enabling EPEL repo, default to false -- name: Ensure rhel 7 extras exists in yum.repos.d - copy: src=oso-rhui-rhel-7-extras.repo dest=/etc/yum.repos.d/oso-rhui-rhel-7-extras.repo +- assert: + that: openshift_deployment_type in known_openshift_deployment_types -- name: Ensure the kubernetes repo is available - copy: src=epel7-kubernetes.repo dest=/etc/yum.repos.d/epel7-kubernetes.repo +# TODO: remove this when origin support actually works +- fail: msg="OpenShift Origin support is not currently enabled" + when: openshift_deployment_type == 'origin' -- name: Ensure the origin repo is available - copy: src=epel7-openshift.repo dest=/etc/yum.repos.d/epel7-openshift.repo +- name: Create any additional repos that are defined + template: + src: yum_repo.j2 + dest: /etc/yum.repos.d/openshift_additional.repo + when: openshift_additional_repos | length > 0 -- name: Ensure the rhel repo is available - copy: src=oso-rhui-rhel-7-server.repo dest=/etc/yum.repos.d/oso-rhui-rhel-7-server.repo +- name: Remove the additional repos if no longer defined + file: + dest: /etc/yum.repos.d/openshift_additional.repo + state: absent + when: openshift_additional_repos | length == 0 + +- name: Remove any yum repo files for other deployment types + file: + path: "/etc/yum.repos.d/{{ item | basename }}" + state: absent + with_fileglob: + - '*/*' + when: not (item | search("/files/" + openshift_deployment_type + "/")) and (item | search(".repo$")) + +- name: Configure gpg keys if needed + copy: src={{ item }} dest=/etc/pki/rpm-gpg/ + with_fileglob: + - "{{ openshift_deployment_type }}/*" + when: item | basename | match("RPM-GPG-KEY-") + +- name: Configure yum repositories + copy: src={{ item }} dest=/etc/yum.repos.d/ + with_fileglob: + - "{{ openshift_deployment_type }}/*" + when: item | basename | search(".*\.repo$") -- cgit v1.2.3