Merge "base/centos: take care of whitespaces"

This commit is contained in:
Zuul 2020-06-17 04:28:50 +00:00 committed by Gerrit Code Review
commit 2b140296fc
2 changed files with 12 additions and 15 deletions

View File

@ -206,7 +206,7 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
'dnf-plugins-core' 'dnf-plugins-core'
] %} ] %}
{% set base_centos_yum_repos_to_enable = [ {% set base_centos_yum_repos_to_enable = [
'PowerTools' 'PowerTools',
] %} ] %}
{% set base_centos_yum_repos_to_disable = [ {% set base_centos_yum_repos_to_disable = [
@ -221,17 +221,14 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
] %} ] %}
{% endif %} {% endif %}
RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("centos_yum_repo_packages"), chain=True, clean=False) }} \ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("centos_yum_repo_packages"), chain=True, clean=False) }}
{%- for repo in base_centos_yum_repos_to_enable | customizable('centos_yum_repos_to_enable') %}
&& dnf config-manager --enable {{ repo }} \ {%- for repo in base_centos_yum_repos_to_enable | customizable('centos_yum_repos_to_enable') %} && dnf config-manager --enable {{ repo }} {% endfor -%}
{% endfor -%}
{%- for repo in base_centos_yum_repos_to_disable | customizable('centos_yum_repos_to_disable') %} {%- for repo in base_centos_yum_repos_to_disable | customizable('centos_yum_repos_to_disable') %} && dnf config-manager --disable {{ repo }} {% endfor -%}
&& dnf config-manager --disable {{ repo }} \
{% endfor -%} {%- for key in base_centos_yum_repo_keys | customizable('centos_yum_repo_keys') %} && rpm --import {{ key }} {% endfor %} \
{% for key in base_centos_yum_repo_keys | customizable('centos_yum_repo_keys') -%} {% block base_centos_repo_overrides_post_yum %}{% endblock -%}
&& rpm --import {{ key }} \
{% endfor -%}
{% block base_centos_repo_overrides_post_yum -%}{% endblock -%}
&& {{ macros.rpm_security_update(clean_package_cache) }} && {{ macros.rpm_security_update(clean_package_cache) }}
{%- endif %} {%- endif %}

View File

@ -41,8 +41,8 @@ RUN sed -i \
{% raw %} {% raw %}
{% endblock %} {% endblock %}
{% block base_centos_repo_overrides_post_yum %} {% block base_centos_repo_overrides_post_yum -%}
{% endraw %} {%- endraw -%}
&& sed -i \ && sed -i \
-e "/^mirrorlist/ d" \ -e "/^mirrorlist/ d" \
-e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \ -e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
@ -55,7 +55,7 @@ RUN sed -i \
-e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \ -e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
-e "s|^#baseurl=https://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \ -e "s|^#baseurl=https://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
/etc/yum.repos.d/epel*.repo \ /etc/yum.repos.d/epel*.repo \
{% raw %} {%- raw -%}
{% endblock %} {% endblock %}
{% block base_debian_after_sources_list %} {% block base_debian_after_sources_list %}