Browse Source

simplify repo configuration

Jason DeTiberus 8 years ago
parent
commit
1b9cdb2154

+ 0 - 0
roles/openshift_repos/files/fedora-openshift-enterprise/gpg_keys/.gitkeep


+ 0 - 0
roles/openshift_repos/files/fedora-openshift-enterprise/repos/.gitkeep


+ 0 - 10
roles/openshift_repos/files/online/repos/enterprise-v3.repo

@@ -1,10 +0,0 @@
-[enterprise-v3]
-name=OpenShift Enterprise
-baseurl=https://mirror.ops.rhcloud.com/libra/rhui-rhel-server-7-ose/
-        https://gce-mirror1.ops.rhcloud.com/libra/rhui-rhel-server-7-ose/
-enabled=1
-gpgcheck=0
-failovermethod=priority
-sslverify=False
-sslclientcert=/var/lib/yum/client-cert.pem
-sslclientkey=/var/lib/yum/client-key.pem

+ 0 - 11
roles/openshift_repos/files/online/repos/rhel-7-libra-candidate.repo

@@ -1,11 +0,0 @@
-[rhel-7-libra-candidate]
-name=rhel-7-libra-candidate - \$basearch
-baseurl=https://gce-mirror1.ops.rhcloud.com/libra/rhel-7-libra-candidate/\$basearch/
-        https://mirror.ops.rhcloud.com/libra/rhel-7-libra-candidate/\$basearch/
-gpgkey=https://mirror.ops.rhcloud.com/libra/RPM-GPG-KEY-redhat-openshifthosted
-skip_if_unavailable=True
-gpgcheck=0
-enabled=1
-sslclientcert=/var/lib/yum/client-cert.pem
-sslclientkey=/var/lib/yum/client-key.pem
-sslverify=False

+ 0 - 0
roles/openshift_repos/files/openshift-enterprise/gpg_keys/.gitkeep


+ 0 - 0
roles/openshift_repos/files/openshift-enterprise/repos/.gitkeep


+ 0 - 0
roles/openshift_repos/files/removed/repos/epel7-openshift.repo


+ 0 - 7
roles/openshift_repos/files/removed/repos/maxamillion-origin-next-epel-7.repo

@@ -1,7 +0,0 @@
-[maxamillion-origin-next]
-name=Copr repo for origin-next owned by maxamillion
-baseurl=https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/epel-7-$basearch/
-skip_if_unavailable=True
-gpgcheck=1
-gpgkey=https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/pubkey.gpg
-enabled=1

+ 0 - 0
roles/openshift_repos/files/removed/repos/oso-rhui-rhel-7-extras.repo


+ 0 - 0
roles/openshift_repos/files/removed/repos/oso-rhui-rhel-7-server.repo


+ 9 - 50
roles/openshift_repos/tasks/main.yaml

@@ -29,62 +29,21 @@
   when: openshift_additional_repos | length == 0 and not openshift.common.is_containerized | bool
   notify: refresh cache
 
-- name: Remove any yum repo files for other deployment types RHEL/CentOS
-  file:
-    path: "/etc/yum.repos.d/{{ item | basename }}"
-    state: absent
-  with_fileglob:
-  - "fedora-openshift-enterprise/repos/*"
-  - "fedora-origin/repos/*"
-  - "online/repos/*"
-  - "openshift-enterprise/repos/*"
-  - "origin/repos/*"
-  - "removed/repos/*"
-  when: not openshift.common.is_containerized | bool
-        and not (item | search("/files/" ~ openshift_deployment_type ~ "/repos"))
-        and (ansible_os_family == "RedHat" and ansible_distribution != "Fedora")
-  notify: refresh cache
-
-- name: Remove any yum repo files for other deployment types Fedora
-  file:
-    path: "{{ item | basename }}"
-    state: absent
-  with_fileglob:
-  - "fedora-openshift-enterprise/repos/*"
-  - "fedora-origin/repos/*"
-  - "online/repos/*"
-  - "openshift-enterprise/repos/*"
-  - "origin/repos/*"
-  - "removed/repos/*"
-  when: not openshift.common.is_containerized | bool
-        and not (item | search("/files/fedora-" ~ openshift_deployment_type ~ "/repos"))
-        and (ansible_distribution == "Fedora")
-  notify: refresh cache
-
-- name: Configure gpg keys if needed
+- name: Configure origin gpg keys if needed
   copy:
-    src: "{{ item }}"
+    src: origin/gpg_keys/openshift-ansible-CentOS-SIG-PaaS
     dest: /etc/pki/rpm-gpg/
-  with_fileglob:
-  - "{{ openshift_deployment_type }}/gpg_keys/*"
   notify: refresh cache
-  when: not openshift.common.is_containerized | bool
-
-- name: Configure yum repositories RHEL/CentOS
-  copy:
-    src: "{{ item }}"
-    dest: /etc/yum.repos.d/
-  with_fileglob:
-  - "{{ openshift_deployment_type }}/repos/*"
-  notify: refresh cache
-  when: (ansible_os_family == "RedHat" and ansible_distribution != "Fedora")
+  when: ansible_os_family == "RedHat" and ansible_distribution != "Fedora"
+        and openshift_deployment_type == 'origin'
         and not openshift.common.is_containerized | bool
 
-- name: Configure yum repositories Fedora
+- name: Configure origin yum repositories RHEL/CentOS
   copy:
+    src: origin/repos/openshift-ansible-centos-paas-sig.repo
     src: "{{ item }}"
     dest: /etc/yum.repos.d/
-  with_fileglob:
-  - "fedora-{{ openshift_deployment_type }}/repos/*"
   notify: refresh cache
-  when: (ansible_distribution == "Fedora") and not openshift.common.is_containerized | bool
+  when: ansible_os_family == "RedHat" and ansible_distribution != "Fedora"
+        and openshift_deployment_type == 'origin'
+        and not openshift.common.is_containerized | bool