diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2015-03-18 17:15:19 -0400 |
---|---|---|
committer | Jason DeTiberus <jdetiber@redhat.com> | 2015-03-18 17:23:59 -0400 |
commit | 8613b70503d2d1cbe57ddebc11919edeb26eaadc (patch) | |
tree | 92a6a85e4b8e670ace8c6b518d93807059ddd285 /roles/openshift_repos/tasks | |
parent | db9cf8ef4f030f30391e021f360fe0c3db1dce74 (diff) | |
download | openshift-8613b70503d2d1cbe57ddebc11919edeb26eaadc.tar.gz openshift-8613b70503d2d1cbe57ddebc11919edeb26eaadc.tar.bz2 openshift-8613b70503d2d1cbe57ddebc11919edeb26eaadc.tar.xz openshift-8613b70503d2d1cbe57ddebc11919edeb26eaadc.zip |
Rename repos role to openshift_repos
- Rename repos role to openshift_repos
- Make openshift_repos a dependency of openshift_common
- Add README and metadata for openshift_repos
- Playbook updates for role rename
- Verify libselinux-python is installed, otherwise some of the bulit-in
modules we use fail
Diffstat (limited to 'roles/openshift_repos/tasks')
-rw-r--r-- | roles/openshift_repos/tasks/main.yaml | 46 |
1 files changed, 46 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..6219c4906 --- /dev/null +++ b/roles/openshift_repos/tasks/main.yaml @@ -0,0 +1,46 @@ +--- +# TODO: Add flag for enabling EPEL repo, default to false + +- 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$") |