File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
environments/common/inventory/group_vars/all Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 1
- # default proxy address to first squid api address port 3128 if squid group non-empty, else empty string to avoid breaking hostvars
2
- proxy_http_proxy : " {{ 'http://' + hostvars[groups['squid'].0].api_address + ':' + (squid_http_port | string) if groups['squid'] else '' }}"
1
+ # default proxy address to hostname of first squid host, port 3128
2
+ # if squid group non-empty, else else empty string to avoid breaking hostvars
3
+
4
+ # override these to provide basic_auth:
5
+ proxy_basic_user : ' '
6
+ proxy_basic_password : ' '
7
+
8
+ # some indirection to make this logic easier:
9
+ proxy_http_address : " {{ hostvars[groups['squid'].0].api_address }}"
10
+ proxy_http_port : " {{ squid_http_port }}"
11
+ proxy_basic_auth : " {{ proxy_basic_user }}:{{ proxy_basic_password }}@"
12
+ proxy_http_proxy_default : >-
13
+ {{ 'http://' +
14
+ (proxy_basic_auth if proxy_basic_password != '' else '') +
15
+ proxy_http_address + ':' + (proxy_http_port | string)
16
+ }}
17
+ proxy_http_proxy : " {{ proxy_http_proxy_default if groups['squid'] else '' }}"
You can’t perform that action at this time.
0 commit comments