Files
configpolicy/roles/useproxy/templates/proxy.env.j2
Dustin C. Hatch 7b61a7da7e r/useproxy: Configure system-wide proxy
The *useproxy* role configures the `http_proxy` et al. environmet
variables for systemd services and interactive shells.  Additionally, it
configures Yum repositories to use a single mirror via the `baseurl`
setting, rather than a list of mirrors via `metalink`, since the proxy
a) the proxy only allows access to _dl.fedoraproject.org_ and b) the
proxy caches RPM files, but this is only effective if all clients use
the same mirror all the time.

The `useproxy.yml` playbook applies this role to servers in the
*needproxy* group.
2024-08-12 18:47:04 -05:00

17 lines
348 B
Django/Jinja

{% if http_proxy|d %}
http_proxy={{ http_proxy }}
HTTP_PROXY={{ http_proxy }}
{% endif %}
{% if https_proxy|d %}
https_proxy={{ https_proxy }}
HTTPS_PROXY={{ https_proxy }}
{% endif %}
{% if all_proxy|d %}
all_proxy={{ all_proxy }}
ALL_PROXY={{ all_proxy }}
{% endif %}
{% if no_proxy %}
no_proxy={{ no_proxy }}
NO_PROXY={{ no_proxy }}
{% endif %}