diff options
author | Matt Woodson <mwoodson@redhat.com> | 2015-02-24 10:16:20 -0500 |
---|---|---|
committer | Matt Woodson <mwoodson@redhat.com> | 2015-02-24 10:16:20 -0500 |
commit | 41ad58a9b9cd59eb5d8bece20d0c1073190d67b4 (patch) | |
tree | 7f11cf6a031a5c8b0efe9618c7ec3476c39fcbb8 /roles/repos/tasks | |
parent | f780d4fa01a1e8b1559d31a7065715317a884ec4 (diff) | |
parent | 0d0b7fa2bba160e8d04ba0f67a0de5c7a06499db (diff) | |
download | openshift-41ad58a9b9cd59eb5d8bece20d0c1073190d67b4.tar.gz openshift-41ad58a9b9cd59eb5d8bece20d0c1073190d67b4.tar.bz2 openshift-41ad58a9b9cd59eb5d8bece20d0c1073190d67b4.tar.xz openshift-41ad58a9b9cd59eb5d8bece20d0c1073190d67b4.zip |
Merge branch 'master' into tower_install
Conflicts:
lib/aws_command.rb
Diffstat (limited to 'roles/repos/tasks')
-rw-r--r-- | roles/repos/tasks/main.yaml | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/roles/repos/tasks/main.yaml b/roles/repos/tasks/main.yaml index 3b66bb392..43786da41 100644 --- a/roles/repos/tasks/main.yaml +++ b/roles/repos/tasks/main.yaml @@ -1,13 +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 a docker repo is laid down - copy: src=docker.repo dest=/etc/yum.repos.d/docker.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-origin.repo dest=/etc/yum.repos.d/epel7-origin.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: 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$") |