Browse Source

Merge pull request #2360 from detiber/repo_rework

Repo rework
Jason DeTiberus 8 years ago
parent
commit
4656fff388

+ 6 - 1
README_AWS.md

@@ -135,7 +135,12 @@ Install Dependencies
 --------------------
 1. Ansible requires python-boto for aws operations:
 
-RHEL/CentOS/Fedora
+Fedora
+```
+  dnf install -y ansible python-boto pyOpenSSL
+```
+
+RHEL/CentOS
 ```
   yum install -y ansible python-boto pyOpenSSL
 ```

+ 6 - 1
README_openstack.md

@@ -17,7 +17,12 @@ Install Dependencies
 * `python-neutronclient`
 * `python-heatclient`
 
-On RHEL / CentOS / Fedora:
+On Fedora:
+```
+  dnf install -y ansible python-novaclient python-neutronclient python-heatclient
+```
+
+On RHEL / CentOS:
 ```
   yum install -y ansible python-novaclient python-neutronclient python-heatclient
 ```

+ 0 - 4
inventory/byo/hosts.origin.example

@@ -109,10 +109,6 @@ openshift_release=v1.2
 # Origin copr repo
 #openshift_additional_repos=[{'id': 'openshift-origin-copr', 'name': 'OpenShift Origin COPR', 'baseurl': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/epel-7-$basearch/', 'enabled': 1, 'gpgcheck': 1, 'gpgkey': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/pubkey.gpg'}]
 
-# Origin Fedora copr repo
-# Use this if you are installing on Fedora
-#openshift_additional_repos=[{'id': 'fedora-openshift-origin-copr', 'name': 'OpenShift Origin COPR for Fedora', 'baseurl': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/fedora-openshift/fedora-$releasever-$basearch/', 'enabled': 1, 'gpgcheck': 1, 'gpgkey': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/fedora-openshift/pubkey.gpg'}]
-
 # htpasswd auth
 openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
 # Defining htpasswd users

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


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


+ 0 - 8
roles/openshift_repos/files/fedora-origin/repos/maxamillion-fedora-openshift-fedora.repo

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

+ 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