Merge "Allow updates from untrusted mirrors"

This commit is contained in:
Zuul 2018-03-05 16:02:04 +00:00 committed by Gerrit Code Review
commit 979d6a74ac
3 changed files with 12 additions and 4 deletions

View File

@ -11,3 +11,10 @@ An ansible role to configure services to use mirrors.
URL to override the generated pypi mirror url based on
:zuul:rolevar:`configure-mirrors.mirror_fqdn`.
.. zuul:rolevar:: set_apt_mirrors_trusted
:default: False
Set to True in order to tag APT mirrors as trusted, needed
when accessing unsigned mirrors with newer releases like
Ubuntu Bionic.

View File

@ -1,3 +1,4 @@
mirror_fqdn: "{{ zuul_site_mirror_fqdn|default(omit) }}"
pypi_mirror: "http://{{ mirror_fqdn }}/pypi/simple"
set_apt_mirrors_trusted: False
wheel_mirror: "http://{{ mirror_fqdn }}/wheel/{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}-{{ ansible_architecture | lower }}"

View File

@ -1,5 +1,5 @@
# {{ ansible_managed }}
deb {{ package_mirror }} {{ ansible_distribution_release }} main universe
deb {{ package_mirror }} {{ ansible_distribution_release }}-updates main universe
deb {{ package_mirror }} {{ ansible_distribution_release }}-backports main universe
deb {{ package_mirror }} {{ ansible_distribution_release }}-security main universe
deb {% if set_apt_mirrors_trusted %}[ trusted=yes ] {% endif %}{{ package_mirror }} {{ ansible_distribution_release }} main universe
deb {% if set_apt_mirrors_trusted %}[ trusted=yes ] {% endif %}{{ package_mirror }} {{ ansible_distribution_release }}-updates main universe
deb {% if set_apt_mirrors_trusted %}[ trusted=yes ] {% endif %}{{ package_mirror }} {{ ansible_distribution_release }}-backports main universe
deb {% if set_apt_mirrors_trusted %}[ trusted=yes ] {% endif %}{{ package_mirror }} {{ ansible_distribution_release }}-security main universe