{% if has_rpmostree is not defined and liveimg is not defined %}
{% set repo_base = distro_tree.url_in_lab(lab_controller, scheme=['http', 'ftp']) %}
{% if repo_base %}
{% for repo in distro_tree.repos %}
{% if var('no_%s_repos' % repo.repo_type) is undefined and var('no_repo_%s' % repo.repo_id) is undefined %}
cat <<"EOF" >/etc/yum.repos.d/beaker-{{ repo.repo_id }}.repo
[beaker-{{ repo.repo_id }}]
name=beaker-{{ repo.repo_id }}
baseurl={{ repo_base|urljoin(repo.path) }}
{% if var('disable_%s_repos' % repo.repo_type) is undefined and var('disable_repo_%s' % repo.repo_id) is undefined %}
enabled=1
{%  else %}
enabled=0
{% endif %}
gpgcheck=0
skip_if_unavailable=1
EOF
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% if customrepos %}
{% for repo in customrepos %}
cat <<"EOF" >/etc/yum.repos.d/{{ repo.repo_id }}.repo
[{{ repo.repo_id }}]
name={{ repo.repo_id }}
baseurl={{ repo.path }}
enabled=1
gpgcheck=0
skip_if_unavailable=1
EOF
{% endfor %}
{% endif %}
