@@ -317,22 +317,12 @@ kolla_build_blocks:
317317 sed -i -e '/\[{{ repo.tag }}\]/,/^\[/ s/^\(mirrorlist *=.*\)/#\1/g' \
318318 -e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(baseurl *=.*\)/#\1/g' \
319319 -e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(metalink *=.*\)/#\1/g' \
320- {% if stackhpc_repo_mirror_username is truthy %}
321- -e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nusername={{ stackhpc_repo_mirror_username }}|' \
322- -e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\npassword={{ stackhpc_repo_mirror_password }}|' \
323- {% endif %}
324320 -e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} && \
325321 {% endif %}
326322 {% endfor %}
327323 {% else %}
328324 RUN \
329325 rm /etc/apt/sources.list && \
330- rm -f /etc/apt/auth.conf && \
331- {% if stackhpc_repo_mirror_username is truthy %}
332- echo 'machine {{ stackhpc_repo_mirror_url }}' >> /etc/apt/auth.conf && \
333- echo 'login {{ stackhpc_repo_mirror_username }}' >> /etc/apt/auth.conf && \
334- echo 'password {{ stackhpc_repo_mirror_password }}' >> /etc/apt/auth.conf && \
335- {% endif %}
336326 {% for repo in stackhpc_ubuntu_focal_base_repos %}
337327 echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
338328 {% endif %}
@@ -350,10 +340,6 @@ kolla_build_blocks:
350340 sed -i -e '/\[{{ repo.tag }}\]/,/^\[/ s/^\(mirrorlist *=.*\)/#\1/g' \
351341 -e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(baseurl *=.*\)/#\1/g' \
352342 -e '/\[{{ repo.tag }}\]/,/^\[/ s/^[# ]*\(metalink *=.*\)/#\1/g' \
353- {% if stackhpc_repo_mirror_username is truthy %}
354- -e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nusername={{ stackhpc_repo_mirror_username }}|' \
355- -e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\npassword={{ stackhpc_repo_mirror_password }}|' \
356- {% endif %}
357343 -e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} &&{% endif %} \
358344 {% endfor %}
359345 {% endif %}
@@ -364,12 +350,6 @@ kolla_build_blocks:
364350 {% endif %}
365351 RUN \
366352 rm /etc/apt/sources.list && \
367- rm -f /etc/apt/auth.conf && \
368- {% if stackhpc_repo_mirror_username is truthy %}
369- echo 'machine {{ stackhpc_repo_mirror_url }}' >> /etc/apt/auth.conf && \
370- echo 'login {{ stackhpc_repo_mirror_username }}' >> /etc/apt/auth.conf && \
371- echo 'password {{ stackhpc_repo_mirror_password }}' >> /etc/apt/auth.conf && \
372- {% endif %}
373353 {% for repo in stackhpc_ubuntu_focal_repos %}
374354 echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
375355 {% endif %}
0 commit comments