Ansible Role squid
This role installs and configures squid as a caching proxy for the web.
Optional Role Variables
Variable |
Description |
Default Value |
---|---|---|
|
List of dictionaries containing hosts and subnets from where browsing should be allowed. Subkeys:
|
|
|
Multiline string. Raw content which will be appended next to the other ACLs at the top of the config. |
unset |
|
List of dictionaries containing ports to which access is allowed. All other ports are blocked. Subkeys:
|
|
|
List of dictionaries containing ports to which the HTTP CONNECT method is allowed. Subkeys:
|
|
|
String. Directory where Squid coredumps are stored. |
|
|
List of additional |
|
|
List of socket addresses where Squid will listen for HTTP client requests. |
|
|
Multiline string. Raw content which will be appended to the end of |
unset |
|
List of refresh patterns. |
|
|
Boolean. Enables or disables the squid service, analogous to |
|
Example:
# optional
squid__conf_acl_localnet__group_var: []
squid__conf_acl_localnet__host_var:
- src: '192.0.2.0/24'
state: 'present'
squid__conf_acl_raw: |-
acl QUERY urlpath_regex cgi-bin \?
acl block_port port 8905
squid__conf_acl_safe_ports__group_var: []
squid__conf_acl_safe_ports__host_var:
- port: '563'
state: 'present'
squid__conf_acl_ssl_ports__group_var: []
squid__conf_acl_ssl_ports__host_var:
- port: '563'
state: 'present'
squid__conf_coredump_dir: '/var/spool/squid'
squid__conf_http_access:
- 'deny test'
- 'deny block'
squid__conf_http_port:
- '3128'
squid__conf_raw: |-
access_log /var/log/squid/access.log
icp_access deny lf_banned
icp_access allow all
cache deny QUERY
squid__conf_refresh_pattern:
- '^ftp: 1440 20% 10080'
- '-i (/cgi-bin/|\?) 0 0% 0'
- '. 0 20% 4320'
squid__service_enabled: true