Skip to content

Commit 6db7e69

Browse files
committed
Make no_proxy list more configurable
1 parent 0d6485c commit 6db7e69

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ansible/roles/proxy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ Define http/s proxy configuration.
66

77
- `proxy_http_proxy`: Required. Address of http proxy. E.g. "http://10.1.0.28:3128" for a Squid proxy on default port.
88
- `proxy_https_proxy`: Optional. Address of https proxy. Default is `{{ proxy_http_proxy }}`.
9-
- `proxy_no_proxy`: Optional. Comma-separated list of addresses not to proxy. Default is to concatenate `inventory_hostname` (for hostnames) and `ansible_host` (for host IPs) for all Ansible hosts.
9+
- `proxy_no_proxy_extra`: Optional. List of additional addresses not to proxy. Will be combined with default list which includes `inventory_hostname` (for hostnames) and `ansible_host` (for host IPs) for all Ansible hosts.
1010
- `proxy_dnf`: Optional bool. Whether to configure yum/dnf proxying through `proxy_http_proxy`. Default `true`.
1111
- `proxy_systemd`: Optional bool. Whether to give processes started by systemd the above http, https and no_proxy configuration. **NB** Running services will need restarting if this is changed. Default `true`.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# proxy_http_proxy:
1+
# proxy_http_proxy:
22
proxy_https_proxy: "{{ proxy_http_proxy }}"
3-
proxy_no_proxy: "{{ (['localhost', '127.0.0.1'] + groups['all'] + hostvars.values() | map(attribute='ansible_host')) | sort | join(',') }}"
3+
proxy_no_proxy_defaults: "{{ ['localhost', '127.0.0.1'] + groups['all'] + hostvars.values() | map(attribute='ansible_host') }}"
4+
proxy_no_proxy_extras: []
5+
proxy_no_proxy: "{{ (proxy_no_proxy_defaults + proxy_no_proxy_extras) | sort | join(',') }}"
46
proxy_dnf: true
57
proxy_systemd: true

0 commit comments

Comments
 (0)