81 lines
4.5 KiB
Plaintext
81 lines
4.5 KiB
Plaintext
Puppet module: squid
|
|
|
|
# Written by Lab42 #
|
|
# http://www.Example42.com
|
|
|
|
# Customized by Matteo Cappadonna #
|
|
|
|
Licence: Apache2
|
|
|
|
DESCRIPTION:
|
|
This module installs and manages squid.
|
|
Standard and extended classes are available.
|
|
Decide and customize how you want to define configuration files: static files, templates, infile modifications...
|
|
|
|
|
|
USER VARIABLES:
|
|
In order to customize the behaviour of the module you can set the following variables:
|
|
|
|
squid_port # Define the squid port (default: "3128")
|
|
squid_port_options # Define options for the squid port (default is nothing)
|
|
squid_icp_port # Define the squid icp port (default: "3130")
|
|
squid_type_accelerator # Define if proxy run in accelerator mode (default: false)
|
|
squid_cache_hostname # Define the visible proxy hostname (default: "localhost")
|
|
squid_default_acls # Define if config file was populated with default acls (default: true)
|
|
squid_custom_acls # An array containing the custom acl entry
|
|
squid_default_http_access # Define if config file was populated with default http_access (default: true)
|
|
squid_custom_http_accesses # An array containing the custom http_access entry
|
|
squid_cache_dir # Define where squid store his cache (default: "/var/spool/squid")
|
|
squid_cache_dir_type # Define the type of squid cache dir (default: "ufs")
|
|
squid_cache_size # Define how many disk space squid use for cache in MB (default: "100")
|
|
squid_cache_mem # Define how many ram squid use in MB (default: "8")
|
|
squid_cache_parent # Define the parent cache peer (if empty, no parent cache peer is setted)
|
|
squid_cache_parent_port # Define the parent cache port (default: 3128)
|
|
squid_cache_parent_icp_port # Define the parent cache icp port (default: 3130)
|
|
squid_cache_parent_options # Define the options for cache_peer with type 'parent' (default: "proxy-only default")
|
|
squid_cache_peers # An array with the sibiling cache_peer for the squid (if empty, no cache peers are setted)
|
|
squid_cache_peers_port # Define the sibiling cache peers port (default: 3128)
|
|
squid_cache_peers_icp_port # Define the sibiling cache peers icp port (default: 3130)
|
|
squid_cache_peers_options # Define the options for cache_peer with type 'sibiling' (default: "proxy-only")
|
|
squid_cache_log_dir # Define where squid save his log files (default: "/var/log/squid3")
|
|
squid_cache_log_rotate # Define the number of logfiles rotation (default: "0")
|
|
|
|
|
|
USAGE:
|
|
# Standard Classes
|
|
include squid # Install and run squid
|
|
|
|
include squid::disable # Disable squid service.
|
|
include squid::disableboot # Disable squid service at boot time, but don't stop if it's running.
|
|
include squid::absent # Remove squid package.
|
|
|
|
# Extended Classes (generally require storeconfigs)
|
|
include squid::monitor # Monitor squid - Automatically included if $monitor=yes - Requires Example42's monitor module
|
|
include squid::backup # Backup squid data - Automatically included if $backup=yes - Requires Example42's backup module
|
|
include squid::firewall # Manages firewall rule for squid service - Automatically included if $firewall=yes - Requires Example42's firewall module
|
|
|
|
# Generic define to set parameters in the main configuration file. EXPERIMENTAL.
|
|
squid::conf { "ParameterName": value="YourValue"} # Generic
|
|
|
|
# Module specific classes
|
|
|
|
# Module specific defines
|
|
|
|
|
|
GENERAL VARIABLES:
|
|
Example42 modules collection uses some general variables that can influence the behaviour of this module.
|
|
You can happily live without considering or setting them, but they can be useful to manage different projects maintanining the module's resuability.
|
|
$my_project - If set, permits you to alter and customize the module behaviour
|
|
and files's deploy logic in custom project classes than can be placed in a separated module.
|
|
$base_source - Let you define an alternative source for static files:
|
|
- $base_source not set -> Files are looked in puppet://$servername/ (the PuppetMaster)
|
|
- $base_source set -> Files are looked in $base_source ( could be puppet://$servername/$my_module )
|
|
Note that the module automatically manages the different paths for Puppet pre 0.25
|
|
|
|
|
|
DEPENDENCIES:
|
|
Standard classes generally don't need external modules.
|
|
Extended classes need the relevant external modules (import monitor ; import backup ... ) and the "common" module (import common)
|
|
squid::conf generic infile configuration define needs the "common" module
|
|
Check on individual module specific classes and defines if there are specific requirements.
|