Do not refer the proxy_env variable.

This commit is contained in:
Andrea Dell'Amico 2020-05-22 19:39:36 +02:00
parent c6c7229dc0
commit 01aea33431
2 changed files with 2 additions and 4 deletions

View File

@ -3,9 +3,7 @@
block: block:
- name: Install the proxy environment file - 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 template: src=10-caching-proxy.sh.j2 dest=/etc/profile.d/10-caching-proxy.sh owner=root group=root mode=0444
when: when: enable_env_proxy | bool
- proxy_env is defined
- enable_env_proxy | bool
- name: Remove the proxy environment file if not required - 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 template: src=10-caching-proxy.sh.j2 dest=/etc/profile.d/10-caching-proxy.sh owner=root group=root mode=0444

View File

@ -1,5 +1,5 @@
{% for proto in env_proxy_protocols %} {% for proto in env_proxy_protocols %}
export {{ proto }}="{{ proxy_env.http_proxy }}" export {{ proto }}="{{ env_proxy_http_url }}"
{% endfor %} {% 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 %}"
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 %}"