Installs and configures squid with templating of the most common set of parameters.
Current version available on your platform only (no upgrade from an existing installation)
None
Defaults Common configuration
squid_cache_mgr
: cache manager's email ; defaults to[email protected]
squid_http_port
: port to which squid listens ; defaults to3128
squid_error_default_language
: defaults toen
Access list definition
squid_acl_list
: list of acls ; defaultlocalnet
set to RFC1918 possible internal network and localhost - edit depending on your needs
Access control
squid_http_access_rules
: list of acls that are allowed or denied access to the proxy ; defaults toallow localnet
squid_acl_safe_ports
: ports the proxy is allowed to connect to ; defaults to most used ports on the Internet (same as squid's default configuration)squid_acl_ssl_ports
: ports to which the CONNECT command is allowed to ; defaults to443
(same as squid's default configuration)
Cache control
squid_cache_dir_size
: size of default disk cache ;undefined
by default ; example show how to set it to 256 MBsquid_maximum_object_size
: maximum size of file stored in the cache ; defaults to4 MB
(squid default)squid_cache_list
: additional 'cache' directives, used to explictely allow or deny caching of requests matching the acl ; defaults to[]
(empty)
Cache peer control
squid_cache_peers
: list of cache peers ; defaults to[]
(empty) ; for the ones with authentication please use a secrets environment filesquid_cache_peer_access_rules
: list of cache_peer with the acl allowed or denied to use the cache peer ; defaults to[]
(empty) ; example includes the use ofsquid_always_direct_rules
squid_always_direct_rules
: prevent any cache_peer being used for requests matching the acls ; defaults to[]
(empty)squid_never_direct_rules
: always use cache peers for requests matching the acls (those defined withsquid_always_direct_rules
take precedence) ; defaults to[]
Vars
squid_user
: UNIX user squid runs as ; platform-dependent, defaults tosquid
squid_group
: UNIX group squid runs as ; platform-dependent, defaults tosquid
Globals
None
None
This role has been tested on these platforms :
Distribution | Version |
---|---|
Debian | 10 (buster) |
Debian | 9 (stretch) |
Amazon Linux | 2 (karoo) |
Ansible version :
- 2.9 : 2.9.0 ; python3 (3.7.5)
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- role: jcmontigny.ansible_squid
BSD
Jean-Christophe Montigny