diff --git a/roles/configure-mirrors/README.rst b/roles/configure-mirrors/README.rst index 7d2ce0f9d..3d11207c5 100644 --- a/roles/configure-mirrors/README.rst +++ b/roles/configure-mirrors/README.rst @@ -31,7 +31,15 @@ An ansible role to configure services to use mirrors. when accessing unsigned mirrors with newer releases like Ubuntu Bionic. --- zuul:rolevar:: configure_mirrors_extra_repos +.. zuul:rolevar:: enable_deb_src_repos + :default: True + + Set this to True in order to enable deb-src entries in sources.list + configs for apt. Note this option currently only works on Debian + (not Ubuntu) installations and will be set to default to False in + the near future. + +.. zuul:rolevar:: configure_mirrors_extra_repos :default: True Set to False to opt-out of installing extra repositories such diff --git a/roles/configure-mirrors/defaults/main.yaml b/roles/configure-mirrors/defaults/main.yaml index 188c21161..f8230f15f 100644 --- a/roles/configure-mirrors/defaults/main.yaml +++ b/roles/configure-mirrors/defaults/main.yaml @@ -10,4 +10,5 @@ http_or_https: >- {%- endif -%} pypi_mirror: "{{ http_or_https }}://{{ pypi_fqdn }}/pypi/simple" wheel_mirror: "{{ http_or_https }}://{{ mirror_fqdn }}/wheel/{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}-{{ ansible_architecture | lower }}" +enable_deb_src_repos: True configure_mirrors_extra_repos: True diff --git a/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/backports.list.j2 b/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/backports.list.j2 index 82a9787f1..485651c25 100644 --- a/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/backports.list.j2 +++ b/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/backports.list.j2 @@ -1,3 +1,5 @@ # {{ ansible_managed }} deb {{ package_mirror }} {{ ansible_distribution_release }}-backports main +{% if enable_deb_src_repos | bool -%} deb-src {{ package_mirror }} {{ ansible_distribution_release }}-backports main +{% endif -%} diff --git a/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/default.list.j2 b/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/default.list.j2 index ca3240d38..07ebb910a 100644 --- a/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/default.list.j2 +++ b/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/default.list.j2 @@ -1,3 +1,5 @@ # {{ ansible_managed }} deb {{ package_mirror }} {{ ansible_distribution_release }} main +{% if enable_deb_src_repos | bool -%} deb-src {{ package_mirror }} {{ ansible_distribution_release }} main +{% endif -%} diff --git a/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/security.list.j2 b/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/security.list.j2 index 71bdabdbd..d22515378 100644 --- a/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/security.list.j2 +++ b/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/security.list.j2 @@ -1,3 +1,5 @@ # {{ ansible_managed }} deb {{ security_mirror }} {{ ansible_distribution_release }}{% if ansible_distribution_release not in ['jessie', 'stretch', 'buster'] %}-security{% endif %} main +{% if enable_deb_src_repos | bool -%} deb-src {{ security_mirror }} {{ ansible_distribution_release }}{% if ansible_distribution_release not in ['jessie', 'stretch', 'buster'] %}-security{% endif %} main +{% endif -%} diff --git a/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/updates.list.j2 b/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/updates.list.j2 index 155b23024..159677462 100644 --- a/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/updates.list.j2 +++ b/roles/configure-mirrors/templates/apt/etc/apt/sources.list.d/updates.list.j2 @@ -1,3 +1,5 @@ # {{ ansible_managed }} deb {{ package_mirror }} {{ ansible_distribution_release }}-updates main +{% if enable_deb_src_repos | bool -%} deb-src {{ package_mirror }} {{ ansible_distribution_release }}-updates main +{% endif -%}