From 03f316e7a242d75db35e7e9f72f3f08a28b188f3 Mon Sep 17 00:00:00 2001 From: Etienne Champetier Date: Tue, 20 Oct 2020 02:06:07 -0400 Subject: [PATCH] Fix proxy and module_hotfixes (#6837) This fixes the Containerd + EL8 case that was missed in 7d1ab3374e0b8c35ecbd7fb2339fc93c367c5c19 On CentOS 8 with proxy ansible render inline `proxy` and `module_hotfixes` options. For example: ``` proxy=http://127.0.0.1:3128module_hotfixes=True ``` But expected result: ``` proxy=http://127.0.0.1:3128 module_hotfixes=True ``` Signed-off-by: Etienne Champetier --- .../containerd/templates/rh_containerd.repo.j2 | 8 ++++++-- .../container-engine/docker/templates/rh_docker.repo.j2 | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/roles/container-engine/containerd/templates/rh_containerd.repo.j2 b/roles/container-engine/containerd/templates/rh_containerd.repo.j2 index 81f9c37d5..a8a04f60f 100644 --- a/roles/container-engine/containerd/templates/rh_containerd.repo.j2 +++ b/roles/container-engine/containerd/templates/rh_containerd.repo.j2 @@ -5,5 +5,9 @@ enabled=1 gpgcheck={{ '1' if docker_rh_repo_gpgkey else '0' }} keepcache={{ docker_rpm_keepcache | default('1') }} gpgkey={{ docker_rh_repo_gpgkey }} -{% if http_proxy is defined %}proxy={{ http_proxy }}{% endif %} -{% if ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 8 %}module_hotfixes=True{% endif %} +{% if http_proxy is defined %} +proxy={{ http_proxy }} +{% endif %} +{% if ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 8 %} +module_hotfixes=True +{% endif %} diff --git a/roles/container-engine/docker/templates/rh_docker.repo.j2 b/roles/container-engine/docker/templates/rh_docker.repo.j2 index fe01ed2e6..a8a04f60f 100644 --- a/roles/container-engine/docker/templates/rh_docker.repo.j2 +++ b/roles/container-engine/docker/templates/rh_docker.repo.j2 @@ -5,6 +5,9 @@ enabled=1 gpgcheck={{ '1' if docker_rh_repo_gpgkey else '0' }} keepcache={{ docker_rpm_keepcache | default('1') }} gpgkey={{ docker_rh_repo_gpgkey }} -{% if http_proxy is defined %}proxy={{ http_proxy }}{% endif %} - -{% if ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 8 %}module_hotfixes=True{% endif %} +{% if http_proxy is defined %} +proxy={{ http_proxy }} +{% endif %} +{% if ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 8 %} +module_hotfixes=True +{% endif %}