@@ -287,16 +287,21 @@ base_centos_repo_overrides_post_yum_rocky_list: "{{ stackhpc_rocky_9_repos + sta
287
287
base_centos_repo_overrides_post_yum_list : " {{ base_centos_repo_overrides_post_yum_centos_list if kolla_base_distro == 'centos' else base_centos_repo_overrides_post_yum_rocky_list }}"
288
288
stackhpc_yum_repos : " {{ stackhpc_centos_stream_repos if kolla_base_distro == 'centos' else stackhpc_rocky_9_repos }}"
289
289
290
+ # Apt sources.list entry prefix.
291
+ # If using an authenticating Pulp proxy we need to trust the repository because
292
+ # the certificate provided by the upstream repo will not match the proxy's IP.
293
+ stackhpc_ubuntu_repo_prefix : " deb {% if stackhpc_repo_mirror_auth_proxy_enabled | bool %}[trusted=yes] {% endif %}"
294
+
290
295
# List of base repositories for Ubuntu Focal.
291
296
stackhpc_ubuntu_focal_base_repos :
292
- - " deb {{ stackhpc_repo_ubuntu_focal_url }} focal main universe"
293
- - " deb {{ stackhpc_repo_ubuntu_focal_url }} focal-updates main universe"
294
- - " deb {{ stackhpc_repo_ubuntu_focal_url }} focal-backports main universe"
295
- - " deb {{ stackhpc_repo_ubuntu_focal_security_url }} focal-security main universe"
297
+ - " {{ stackhpc_ubuntu_repo_prefix }} {{ stackhpc_repo_ubuntu_focal_url }} focal main universe"
298
+ - " {{ stackhpc_ubuntu_repo_prefix }} {{ stackhpc_repo_ubuntu_focal_url }} focal-updates main universe"
299
+ - " {{ stackhpc_ubuntu_repo_prefix }} {{ stackhpc_repo_ubuntu_focal_url }} focal-backports main universe"
300
+ - " {{ stackhpc_ubuntu_repo_prefix }} {{ stackhpc_repo_ubuntu_focal_security_url }} focal-security main universe"
296
301
297
302
# List of UCA repositories for Ubuntu Focal.
298
303
stackhpc_ubuntu_focal_uca_repos :
299
- - " deb {{ stackhpc_repo_ubuntu_cloud_archive_url }} focal-updates/{{ openstack_release }} main"
304
+ - " {{ stackhpc_ubuntu_repo_prefix }} {{ stackhpc_repo_ubuntu_cloud_archive_url }} focal-updates/{{ openstack_release }} main"
300
305
301
306
# List of repositories for Ubuntu Focal.
302
307
stackhpc_ubuntu_focal_repos : " {{ stackhpc_ubuntu_focal_base_repos + stackhpc_ubuntu_focal_uca_repos }}"
@@ -323,6 +328,10 @@ kolla_build_blocks:
323
328
{% else %}
324
329
RUN \
325
330
rm /etc/apt/sources.list && \
331
+ {% if stackhpc_repo_mirror_auth_proxy_enabled | bool %}
332
+ {# We lack the ca-certificates package at this stage, so don't verify the CA initially #}
333
+ echo 'Acquire::https::Verify-Peer "false";' > /etc/apt/apt.conf.d/90no-verify-peer && \
334
+ {% endif %}
326
335
{% for repo in stackhpc_ubuntu_focal_base_repos %}
327
336
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
328
337
{% endif %}
@@ -350,6 +359,7 @@ kolla_build_blocks:
350
359
{% endif %}
351
360
RUN \
352
361
rm /etc/apt/sources.list && \
362
+ rm -f /etc/apt/apt.conf.d/90no-verify-peer && \
353
363
{% for repo in stackhpc_ubuntu_focal_repos %}
354
364
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
355
365
{% endif %}
0 commit comments