yum_repo.j2 604 B

123456789101112131415
  1. # {{ ansible_managed }}
  2. {% for repo in openshift_additional_repos %}
  3. [{{ repo.id }}]
  4. name={{ repo.name | default(repo.id) }}
  5. baseurl={{ repo.baseurl }}
  6. {% set enable_repo = repo.enabled | default('1') %}
  7. enabled={{ 1 if ( enable_repo == 1 or enable_repo == True ) else 0 }}
  8. {% set enable_gpg_check = repo.gpgcheck | default('1') %}
  9. gpgcheck={{ 1 if ( enable_gpg_check == 1 or enable_gpg_check == True ) else 0 }}
  10. {% for key, value in repo.iteritems() %}
  11. {% if key not in ['id', 'name', 'baseurl', 'enabled', 'gpgcheck'] and value is defined %}
  12. {{ key }}={{ value }}
  13. {% endif %}
  14. {% endfor %}
  15. {% endfor %}