From 12ec90897f890e1f5ee417d9f6f56baa359f0313 Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Fri, 20 Feb 2015 23:52:21 -0500 Subject: Repo role refactor to add enterprise support - Add openshift_additional_repos config that allows for setting custom repos - cleanup yum repos that were configured for other deployment types --- roles/repos/templates/yum_repo.j2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/repos/templates/yum_repo.j2 (limited to 'roles/repos/templates') diff --git a/roles/repos/templates/yum_repo.j2 b/roles/repos/templates/yum_repo.j2 new file mode 100644 index 000000000..7ea2c7460 --- /dev/null +++ b/roles/repos/templates/yum_repo.j2 @@ -0,0 +1,15 @@ +# {{ ansible_managed }} +{% 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 %} -- cgit v1.2.3