Skip to content

Commit

Permalink
Puppet-lint fix strict_indent
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjfisher committed Sep 24, 2020
1 parent 1624f75 commit e6f709e
Show file tree
Hide file tree
Showing 14 changed files with 156 additions and 165 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'voxpupuli-test', '>= 1.0.0', :require => false
gem 'voxpupuli-test', '>= 2.0.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
end
Expand Down
19 changes: 9 additions & 10 deletions manifests/auth_param.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @summary
# Defines auth_param entries for a squid server.
# @see
# http://www.squid-cache.org/Doc/config/auth_param/
# @summary
# Defines auth_param entries for a squid server.
# @see
# http://www.squid-cache.org/Doc/config/auth_param/
# @example
# squid::auth_param { 'basic auth_param':
# scheme => 'basic',
Expand All @@ -17,16 +17,15 @@
# auth_param basic children 5
# auth_param basic realm Squid Basic Authentication
# auth_param basic credentialsttl 5 hours
#
# @param scheme
#
# @param scheme
# The scheme used for authentication must be defined. Valid values are 'basic', 'digest', 'negotiate' and 'ntlm'.
# @param entries
# @param entries
# An array of entries, multiple members results in multiple lines in squid.conf
# @param order
# @param order
# Order can be used to configure where in `squid.conf`this configuration section should occur.
define squid::auth_param (
Enum['basic', 'digest', 'negotiate', 'ntlm']
$scheme,
Enum['basic', 'digest', 'negotiate', 'ntlm'] $scheme,
Array $entries,
String $auth_param_name = $title,
String $order = '40',
Expand Down
15 changes: 7 additions & 8 deletions manifests/cache.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @summary
# Defines cache entries for a squid server.
# @see
# @summary
# Defines cache entries for a squid server.
# @see
# http://www.squid-cache.org/Doc/config/cache/
# @example
# squid::cache { 'our_network_hosts_acl':
Expand All @@ -18,11 +18,10 @@
# @param order
# Order can be used to configure where in `squid.conf`this configuration section should occur.
define squid::cache (
Enum['allow', 'deny']
$action = 'allow',
String $value = $title,
String $order = '05',
String $comment = "cache fragment for ${value}"
Enum['allow', 'deny'] $action = 'allow',
String $value = $title,
String $order = '05',
String $comment = "cache fragment for ${value}"
) {
concat::fragment { "squid_cache_${value}":
target => $squid::config,
Expand Down
17 changes: 8 additions & 9 deletions manifests/http_access.pp
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# @summary
# @summary
# Defines http_access entries for a squid server.
# @see
# @see
# https://github.com/puppetlabs/puppetlabs-docker/blob/master/REFERENCE.md
# @example
# squid::http_access { 'our_networks hosts':
# action => 'allow',
# }
#
#
# Adds a squid.conf line
# # http_access fragment for out_networks hosts
# http_access allow our_networks hosts
#
#
# @example
# squid::http_access { 'our_networks hosts':
# action => 'allow',
Expand All @@ -29,11 +29,10 @@
# @param comment
# http_access entry's preceding comment
define squid::http_access (
Enum['allow', 'deny']
$action = 'allow',
String $value = $title,
String $order = '05',
String $comment = "http_access fragment for ${value}"
Enum['allow', 'deny'] $action = 'allow',
String $value = $title,
String $order = '05',
String $comment = "http_access fragment for ${value}"
) {
concat::fragment { "squid_http_access_${value}":
target => $squid::config,
Expand Down
22 changes: 12 additions & 10 deletions manifests/http_port.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
# @param title
# The title/namevar may be in the form `port` or `host:port` to provide the below values. Otherwise,
# specify `port` explicitly, and `host` if desired.
# @param port
# @param port
# Defaults to the port of the namevar and is the port number to listen on.
# @param host
# @param host
# Defaults to the host part of the namevar and is the interface to listen on. If not specified, Squid listens on all interfaces.
# @param options
# @param options
# A string to specify any options for the default. By default and empty string.
# @param ssl
# @param ssl
# When set to `true` creates https_port entries. Defaults to `false`.
# @param order
# Order can be used to configure where in `squid.conf`this configuration section should occur.
Expand Down Expand Up @@ -74,12 +74,14 @@

concat::fragment { "squid_${protocol}_port_${_title}":
target => $squid::config,
content => epp('squid/squid.conf.port.epp', {
title => $_title,
protocol => $protocol,
host_port => $_host_port,
options => $options,
}),
content => epp('squid/squid.conf.port.epp',
{
title => $_title,
protocol => $protocol,
host_port => $_host_port,
options => $options,
}
),
order => "30-${order}",
}

Expand Down
15 changes: 7 additions & 8 deletions manifests/https_port.pp
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# @summary
# @summary
# Defines https_port entries for a squid server. Results are the same with http_port and ssl set to `true`.
# @see
# @see
# http://www.squid-cache.org/Doc/config/https_port/
# @param port
# @param port
# defaults to the namevar and is the port number.
# @param options
# @param options
# A string to specify any options to add to the https_port line. Defaults to an empty string.
# @param order
# Order can be used to configure where in `squid.conf`this configuration section should occur.
define squid::https_port (
Variant[Pattern[/\d+/], Integer]
$port = $title,
String $options = '',
String $order = '05',
Variant[Pattern[/\d+/], Integer] $port = $title,
String $options = '',
String $order = '05',
) {
squid::http_port { "${port}": # lint:ignore:only_variable_string
ssl => true,
Expand Down
9 changes: 4 additions & 5 deletions manifests/icp_access.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @summary
# @summary
# Defines icp_access entries for a squid server.
# @see http://www.squid-cache.org/Doc/config/icp_access/
# @example
Expand All @@ -9,14 +9,13 @@
# Adds a squid.conf line
# icp_access allow our_networks hosts
#
# @param action
# @param action
# Must be `deny` or `allow`. By default it is allow. The squid.conf file is ordered so by default
# all allows appear before all denys. This can be overidden with the `order` parameter.
# @param order
# @param order
# Order can be used to configure where in `squid.conf`this configuration section should occur.
define squid::icp_access (
Enum['allow', 'deny']
$action = 'allow',
Enum['allow', 'deny'] $action = 'allow',
String $value = $title,
String $order = '05',
) {
Expand Down
119 changes: 58 additions & 61 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# @summary
# Module for configuring the squid caching service.
# @summary
# Module for configuring the squid caching service.
# The module will set the SELINUX-context for the cache_dir and port, needs puppet-selinux
#
# @example The set up a simple squid server with a cache to forward http port 80 requests.
Expand All @@ -14,103 +14,103 @@
# squid::http_access{ '!Safe_ports':
# action => deny,
# }
#
# @param ensure_service
#
# @param ensure_service
# The ensure value of the squid service, defaults to `running`.
# @param enable_service
# @param enable_service
# The enable value of the squid service, defaults to `true`.
# @param config
# @param config
# Location of squid.conf file, defaults to `/etc/squid/squid.conf`.
# @param config_user
# @param config_user
# User which owns the config file, default depends on `$operatingsystem`
# @param config_group
# @param config_group
# Group which owns the config file, default depends on `$operatingsystem`
# @param daemon_user
# @param daemon_user
# User which runs the squid daemon, this is used for ownership of the cache directory, default depends on `$operatingsystem`
# @param daemon_group
# @param daemon_group
# Group which runs the squid daemon, this is used for ownership of the cache directory, default depends on `$operatingsystem`
# @param cache_mem
# @param cache_mem
# Defaults to `256 MB`. http://www.squid-cache.org/Doc/config/cache_mem/
# @param cache_replacement_policy
# @param cache_replacement_policy
# Defaults to undef. http://www.squid-cache.org/Doc/config/cache_replacement_policy/
# @param memory_replacement_policy
# @param memory_replacement_policy
# Defaults to undef. http://www.squid-cache.org/Doc/config/memory_replacement_policy/
# @param memory_cache_shared
# @param memory_cache_shared
# Defaults to undef. http://www.squid-cache.org/Doc/config/memory_cache_shared/.
# @param maximum_object_size_in_memory
# @param maximum_object_size_in_memory
# Defaults to `512 KB`. http://www.squid-cache.org/Doc/config/maximum_object_size_in_memory/
# @param url_rewrite_program
# @param url_rewrite_program
# Defaults to undef http://www.squid-cache.org/Doc/config/url_rewrite_program/
# @param url_rewrite_children
# @param url_rewrite_children
# Defaults to undef http://www.squid-cache.org/Doc/config/url_rewrite_children/
# @param url_rewrite_child_options
# @param url_rewrite_child_options
# Defaults to undef http://www.squid-cache.org/Doc/config/url_rewrite_children/
# @param access_log
# @param access_log
# Defaults to `daemon:/var/logs/squid/access.log squid`. http://www.squid-cache.org/Doc/config/access_log/
# @param coredump_dir
# @param coredump_dir
# Defaults to undef. http://www.squid-cache.org/Doc/config/coredump_dir/
# @param error_directory
# @param error_directory
# Defaults to undef. http://www.squid-cache.org/Doc/config/error_directory/
# @param err_page_stylesheet
# @param err_page_stylesheet
# Defaults to undef. http://www.squid-cache.org/Doc/config/err_page_stylesheet/
# @param package_name
# @param package_name
# Name of the squid package to manage, default depends on `$operatingsystem`
# @param package_ensure
# @param package_ensure
# Package status and/or version, default to present
# @param service_name
# @param service_name
# Name of the squid service to manage, default depends on `$operatingsystem`
# @param max_filedescriptors
# @param max_filedescriptors
# Defaults to undef. http://www.squid-cache.org/Doc/config/max_filedescriptors/
# @param workers
# @param workers
# Defaults to undef. http://www.squid-cache.org/Doc/config/workers/
# @param snmp_incoming_address
# @param snmp_incoming_address
# Defaults to undef. Can be set to an IP address to only listen for snmp requests on an individual interface. http://www.squid-cache.org/Doc/config/snmp_incoming_address/
# @param buffered_logs
# @param buffered_logs
# Defaults to undef. http://www.squid-cache.org/Doc/config/buffered_logs/
# @param acls
# @param acls
# Defaults to undef. If you pass in a hash of acl entries, they will be defined automatically. http://www.squid-cache.org/Doc/config/acl/
# @param visible_hostname
# @param visible_hostname
# Defaults to undef. http://www.squid-cache.org/Doc/config/visible_hostname/
# @param via
# @param via
# Defaults to undef. http://www.squid-cache.org/Doc/config/via/
# @param httpd_suppress_version_string
# @param httpd_suppress_version_string
# Defaults to undef. http://www.squid-cache.org/Doc/config/httpd_suppress_version_string/
# @param forwarded_for
# @param forwarded_for
# Defaults to undef. supported values are "on", "off", "transparent", "delete", "truncate". http://www.squid-cache.org/Doc/config/forwarded_for/
# @param http_access
# @param http_access
# Defaults to undef. If you pass in a hash of http_access entries, they will be defined automatically. http://www.squid-cache.org/Doc/config/http_access/
# @param http_ports
# @param http_ports
# Defaults to undef. If you pass in a hash of http_port entries, they will be defined automatically. http://www.squid-cache.org/Doc/config/http_port/
# @param https_ports
# @param https_ports
# Defaults to undef. If you pass in a hash of https_port entries, they will be defined automatically. http://www.squid-cache.org/Doc/config/https_port/
# @param icp_access
# @param icp_access
# Defaults to undef. If you pass in a hash of icp_access entries, they will be defined automatically. http://www.squid-cache.org/Doc/config/icp_access/
# @param refresh_patterns
# @param refresh_patterns
# Defaults to undef. If you pass a hash of refresh_pattern entires, they will be defined automatically. http://www.squid-cache.org/Doc/config/refresh_pattern/
# @param snmp_ports
# @param snmp_ports
# Defaults to undef. If you pass in a hash of snmp_port entries, they will be defined automatically. http://www.squid-cache.org/Doc/config/snmp_port/
# @param send_hit
# @param send_hit
# Defaults to undef. If you pass in a hash of send_hit entries, they will be defined automatically. http://www.squid-cache.org/Doc/config/send_hit/
# @param cache_dirs
# @param cache_dirs
# Defaults to undef. If you pass in a hash of cache_dir entries, they will be defined automatically. http://www.squid-cache.org/Doc/config/cache_dir/
# @param ssl_bump
# @param ssl_bump
# Defaults to undef. If you pass in a hash of ssl_bump entries, they will be defined automatically. http://www.squid-cache.org/Doc/config/ssl_bump/
# @param sslproxy_cert_error
# @param sslproxy_cert_error
# Defaults to undef. If you pass in a hash of sslproxy_cert_error entries, they will be defined automatically. http://www.squid-cache.org/Doc/config/sslproxy_cert_error/
# @param extra_config_sections
# @param extra_config_sections
# Defaults to empty hash. If you pass in a hash of `extra_config_section` resources, they will be defined automatically.
# @param service_restart
# Defaults to undef. Overrides service resource restart command to be executed.
# @param service_restart
# Defaults to undef. Overrides service resource restart command to be executed.
# It can be used to perform a soft reload of the squid service.
# @param squid_bin_path
# @param squid_bin_path
# Path to the squid binary, default depends on `$operatingsystem`
# @example
# class { 'squid':
# cache_mem => '512 MB',
# workers => 3,
# coredump_dir => '/var/spool/squid',
# }
#
#
# @example
# class { 'squid':
# cache_mem => '512 MB',
Expand Down Expand Up @@ -150,8 +150,7 @@
Optional[String] $cache_replacement_policy = $squid::params::cache_replacement_policy,
Optional[String] $memory_replacement_policy = $squid::params::memory_replacement_policy,
Optional[Boolean] $httpd_suppress_version_string = $squid::params::httpd_suppress_version_string,
Optional[Variant[Enum['on', 'off', 'transparent', 'delete', 'truncate'], Boolean]]
$forwarded_for = $squid::params::forwarded_for,
Optional[Variant[Enum['on', 'off', 'transparent', 'delete', 'truncate'], Boolean]] $forwarded_for = $squid::params::forwarded_for,
Optional[String] $visible_hostname = $squid::params::visible_hostname,
Optional[Boolean] $via = $squid::params::via,
Optional[Hash] $acls = $squid::params::acls,
Expand All @@ -172,16 +171,14 @@
Optional[String] $logformat = $squid::params::logformat,
Optional[Boolean] $buffered_logs = $squid::params::buffered_logs,
Optional[Integer] $max_filedescriptors = $squid::params::max_filedescriptors,
Optional[Variant[Enum['on', 'off'], Boolean]]
$memory_cache_shared = $squid::params::memory_cache_shared,
Optional[Hash] $refresh_patterns = $squid::params::refresh_patterns,
Optional[Stdlib::Compat::Ip_address]
$snmp_incoming_address = $squid::params::snmp_incoming_address,
Optional[Hash] $snmp_ports = $squid::params::snmp_ports,
Optional[Hash] $ssl_bump = $squid::params::ssl_bump,
Optional[Hash] $sslproxy_cert_error = $squid::params::sslproxy_cert_error,
Optional[Integer] $workers = $squid::params::workers,
Optional[String] $service_restart = $squid::params::service_restart,
Optional[Variant[Enum['on', 'off'], Boolean]] $memory_cache_shared = $squid::params::memory_cache_shared,
Optional[Hash] $refresh_patterns = $squid::params::refresh_patterns,
Optional[Stdlib::Compat::Ip_address] $snmp_incoming_address = $squid::params::snmp_incoming_address,
Optional[Hash] $snmp_ports = $squid::params::snmp_ports,
Optional[Hash] $ssl_bump = $squid::params::ssl_bump,
Optional[Hash] $sslproxy_cert_error = $squid::params::sslproxy_cert_error,
Optional[Integer] $workers = $squid::params::workers,
Optional[String] $service_restart = $squid::params::service_restart,
) inherits ::squid::params {
contain squid::install
contain squid::config
Expand Down
Loading

0 comments on commit e6f709e

Please sign in to comment.