summaryrefslogtreecommitdiffstats
path: root/roles/openshift_gcp/templates/yum_repo.j2
blob: 77919ea7537ce188a9faa177b85cc4b93c37b419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{% for repo in provision_custom_repositories %}
[{{ repo.id | default(repo.name) }}]
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 }}
{% if 'sslclientcert' in repo %}
sslclientcert={{ "/var/lib/yum/custom_secret_" + (loop.index-1)|string + "_cert" if repo.sslclientcert }}
{% endif %}
{% if 'sslclientkey' in repo %}
sslclientkey={{ "/var/lib/yum/custom_secret_" + (loop.index-1)|string + "_key" if repo.sslclientkey }}
{% endif %}
{% for key, value in repo.iteritems() %}
{% if key not in ['id', 'name', 'baseurl', 'enabled', 'gpgcheck', 'sslclientkey', 'sslclientcert'] and value is defined %}
{{ key }}={{ value }}
{% endif %}
{% endfor %}
{% endfor %}