summaryrefslogtreecommitdiffstats
path: root/roles/openshift_repos/tasks
diff options
context:
space:
mode:
authorTroy Dawson <tdawson@redhat.com>2015-04-16 16:19:02 -0500
committerTroy Dawson <tdawson@redhat.com>2015-04-16 16:19:02 -0500
commit7f7b582a7bc239e69c147b98c8c2512050f12851 (patch)
treef0701e3ce7a42761e9dfb59218057a46e48a901b /roles/openshift_repos/tasks
parentdb9cf8ef4f030f30391e021f360fe0c3db1dce74 (diff)
parent0722304b2f9c94a2f70054e0a3c7feceaedb195c (diff)
downloadopenshift-7f7b582a7bc239e69c147b98c8c2512050f12851.tar.gz
openshift-7f7b582a7bc239e69c147b98c8c2512050f12851.tar.bz2
openshift-7f7b582a7bc239e69c147b98c8c2512050f12851.tar.xz
openshift-7f7b582a7bc239e69c147b98c8c2512050f12851.zip
Merge pull request #158 from openshift/master
Merge master into INT for first v3 INT deploy
Diffstat (limited to 'roles/openshift_repos/tasks')
-rw-r--r--roles/openshift_repos/tasks/main.yaml52
1 files changed, 52 insertions, 0 deletions
diff --git a/roles/openshift_repos/tasks/main.yaml b/roles/openshift_repos/tasks/main.yaml
new file mode 100644
index 000000000..bb1551d37
--- /dev/null
+++ b/roles/openshift_repos/tasks/main.yaml
@@ -0,0 +1,52 @@
+---
+# TODO: Add flag for enabling EPEL repo, default to false
+
+# TODO: Add subscription-management config, with parameters
+# for username, password, poolid(name), and official repos to
+# enable/disable. Might need to make a module that extends the
+# subscription management module to take a poolid and enable/disable the
+# proper repos correctly.
+
+- assert:
+ that: openshift_deployment_type in known_openshift_deployment_types
+
+# TODO: remove this when origin support actually works
+- fail: msg="OpenShift Origin support is not currently enabled"
+ when: openshift_deployment_type == 'origin'
+
+- name: Ensure libselinux-python is installed
+ yum:
+ pkg: libselinux-python
+ state: present
+
+- 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$")