From 01aea334319ef84d86f850d801c5e60e088b4273 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 22 May 2020 19:39:36 +0200 Subject: [PATCH] Do not refer the proxy_env variable. --- tasks/http_client_proxy.yml | 4 +--- templates/10-caching-proxy.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tasks/http_client_proxy.yml b/tasks/http_client_proxy.yml index e5996f6..b670f9f 100644 --- a/tasks/http_client_proxy.yml +++ b/tasks/http_client_proxy.yml @@ -3,9 +3,7 @@ block: - name: Install the proxy environment file template: src=10-caching-proxy.sh.j2 dest=/etc/profile.d/10-caching-proxy.sh owner=root group=root mode=0444 - when: - - proxy_env is defined - - enable_env_proxy | bool + when: enable_env_proxy | bool - name: Remove the proxy environment file if not required template: src=10-caching-proxy.sh.j2 dest=/etc/profile.d/10-caching-proxy.sh owner=root group=root mode=0444 diff --git a/templates/10-caching-proxy.sh.j2 b/templates/10-caching-proxy.sh.j2 index 8f61aec..6e60897 100644 --- a/templates/10-caching-proxy.sh.j2 +++ b/templates/10-caching-proxy.sh.j2 @@ -1,5 +1,5 @@ {% for proto in env_proxy_protocols %} -export {{ proto }}="{{ proxy_env.http_proxy }}" +export {{ proto }}="{{ env_proxy_http_url }}" {% endfor %} export no_proxy="{% for target in no_proxy_targets %}{{ target }}{% if not loop.last %},{% endif %}{% endfor %}" export NO_PROXY="{% for target in no_proxy_targets %}{{ target }}{% if not loop.last %},{% endif %}{% endfor %}"