diff --git a/ansible/roles/proxy/README.md b/ansible/roles/proxy/README.md index 586f99efd..6d51fd9d4 100644 --- a/ansible/roles/proxy/README.md +++ b/ansible/roles/proxy/README.md @@ -6,6 +6,6 @@ Define http/s proxy configuration. - `proxy_http_proxy`: Required. Address of http proxy. E.g. "http://10.1.0.28:3128" for a Squid proxy on default port. - `proxy_https_proxy`: Optional. Address of https proxy. Default is `{{ proxy_http_proxy }}`. -- `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. +- `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. - `proxy_dnf`: Optional bool. Whether to configure yum/dnf proxying through `proxy_http_proxy`. Default `true`. - `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`. diff --git a/ansible/roles/proxy/defaults/main.yml b/ansible/roles/proxy/defaults/main.yml index b5c656b80..569b5a004 100644 --- a/ansible/roles/proxy/defaults/main.yml +++ b/ansible/roles/proxy/defaults/main.yml @@ -1,5 +1,7 @@ -# proxy_http_proxy: +# proxy_http_proxy: proxy_https_proxy: "{{ proxy_http_proxy }}" -proxy_no_proxy: "{{ (['localhost', '127.0.0.1'] + groups['all'] + hostvars.values() | map(attribute='ansible_host')) | sort | join(',') }}" +proxy_no_proxy_defaults: "{{ ['localhost', '127.0.0.1'] + groups['all'] + hostvars.values() | map(attribute='ansible_host') }}" +proxy_no_proxy_extras: [] +proxy_no_proxy: "{{ (proxy_no_proxy_defaults + proxy_no_proxy_extras) | sort | join(',') }}" proxy_dnf: true proxy_systemd: true