diff options
author | OpenShift Bot <eparis+openshiftbot@redhat.com> | 2017-08-30 21:18:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-30 21:18:49 -0400 |
commit | cab9134c4ff7dcc52dda75c94e13874d9ec9083d (patch) | |
tree | 71dd1945e2b202d9b5fc2371291a4d6f9555ecd3 /roles/openshift_repos | |
parent | 248cba6458e7be7463a29b43151879925fdea316 (diff) | |
parent | 3b3f160130f1465a3c40b6d9f9cf66c5de6f9ad6 (diff) | |
download | openshift-cab9134c4ff7dcc52dda75c94e13874d9ec9083d.tar.gz openshift-cab9134c4ff7dcc52dda75c94e13874d9ec9083d.tar.bz2 openshift-cab9134c4ff7dcc52dda75c94e13874d9ec9083d.tar.xz openshift-cab9134c4ff7dcc52dda75c94e13874d9ec9083d.zip |
Merge pull request #5230 from kwoodson/openshift_node_bootstrap
Merged by openshift-bot
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 %} |