diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-08-23 17:57:12 -0400 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2017-08-29 10:26:27 -0400 |
commit | 3b3f160130f1465a3c40b6d9f9cf66c5de6f9ad6 (patch) | |
tree | eda62eecedf4e4305f7c57f1f85d92e6014aa811 /roles/openshift_repos | |
parent | f2ae4eeecb94d5194131a4c31c2beea5071d84b9 (diff) | |
download | openshift-3b3f160130f1465a3c40b6d9f9cf66c5de6f9ad6.tar.gz openshift-3b3f160130f1465a3c40b6d9f9cf66c5de6f9ad6.tar.bz2 openshift-3b3f160130f1465a3c40b6d9f9cf66c5de6f9ad6.tar.xz openshift-3b3f160130f1465a3c40b6d9f9cf66c5de6f9ad6.zip |
Merging openshift_node with openshift bootstrap.
Diffstat (limited to 'roles/openshift_repos')
-rw-r--r-- | roles/openshift_repos/tasks/main.yaml | 27 | ||||
-rw-r--r-- | roles/openshift_repos/templates/yum_repo.j2 | 14 |
2 files changed, 14 insertions, 27 deletions
diff --git a/roles/openshift_repos/tasks/main.yaml b/roles/openshift_repos/tasks/main.yaml index 7458db87e..6b3de4dba 100644 --- a/roles/openshift_repos/tasks/main.yaml +++ b/roles/openshift_repos/tasks/main.yaml @@ -6,23 +6,24 @@ - when: not ostree_booted.stat.exists block: + # TODO: This needs to be removed and placed into a role - name: Ensure libselinux-python is installed package: name=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 - notify: refresh cache - - - 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 + yum_repository: + description: "{{ item.description | default(item.name) }}" + name: "{{ item.name | default(item.id) }}" + baseurl: "{{ item.baseurl }}" + gpgkey: "{{ item.gpgkey | default(omit)}}" + gpgcheck: "{{ item.gpgcheck | default(1) }}" + sslverify: "{{ item.sslverify | default(1) }}" + sslclientkey: "{{ item.sslclientkey | default(omit) }}" + sslclientcert: "{{ item.sslclientcert | default(omit) }}" + file: "{{ item.name }}" + enabled: "{{ item.enabled | default('no')}}" + with_items: "{{ openshift_additional_repos }}" + when: openshift_additional_repos | length > 0 notify: refresh cache # Singleton block diff --git a/roles/openshift_repos/templates/yum_repo.j2 b/roles/openshift_repos/templates/yum_repo.j2 deleted file mode 100644 index ef2cd6603..000000000 --- a/roles/openshift_repos/templates/yum_repo.j2 +++ /dev/null @@ -1,14 +0,0 @@ -{% for repo in openshift_additional_repos %} -[{{ repo.id }}] -name={{ repo.name | default(repo.id) }} -baseurl={{ repo.baseurl }} -{% set enable_repo = repo.enabled | default(1) %} -enabled={{ 1 if ( enable_repo == 1 or enable_repo == True ) else 0 }} -{% set enable_gpg_check = repo.gpgcheck | default(1) %} -gpgcheck={{ 1 if ( enable_gpg_check == 1 or enable_gpg_check == True ) else 0 }} -{% for key, value in repo.iteritems() %} -{% if key not in ['id', 'name', 'baseurl', 'enabled', 'gpgcheck'] and value is defined %} -{{ key }}={{ value }} -{% endif %} -{% endfor %} -{% endfor %} |