From 916748c4273f01410f778d471b49f458102ff03b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20B=C3=A9rtoli?= Date: Tue, 30 Apr 2013 09:27:21 -0300 Subject: [PATCH] Lint --- manifests/init.pp | 25 +++++++++++++++---------- manifests/jail.pp | 15 +++++++++------ manifests/params.pp | 3 ++- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index cc60be5..a26786e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -14,7 +14,8 @@ # Can be defined also by the (top scope) variable $fail2ban_myclass # # [*source*] -# Sets the content of source parameter for main configuration file (fail2ban.conf) +# Sets the content of source parameter for main configuration file +# (fail2ban.conf) # If defined, fail2ban main config file will have the param: source => $source # Can be defined also by the (top scope) variable $fail2ban_source # @@ -38,8 +39,8 @@ # # [*ignoreip*] # Fail2ban will not ban a host which matches an address in this list. -# Can an IP address, a CIDR mask or a DNS host. Several addresses can be defined -# in an array. +# Can an IP address, a CIDR mask or a DNS host. Several addresses can be +# definedin an array. # Default: 127.0.0.1/8 # # [*bantime*] @@ -83,23 +84,27 @@ # # [*jails_config*] # Define how you want to manage jails configuration: -# "file" - To provide jail.local as a normal file. If you choose this option, -# set ONE of [*jails_source*] or [*jails_template*] +# "file" - To provide jail.local as a normal file. If you choose this +# option,set ONE of [*jails_source*] or [*jails_template*] # "concat" - To build it up using different fragments -# - This option, (preferred), permits the use of the fail2ban::jail define +# - This option, (preferred), permits the use of the +# fail2ban::jail define # Default: empty. Uses "jail.local" from distribution, if any. # # [*jails_source*] # Sets the content of source parameter for the jail.local configuration file # # [*jails_template*] -# Sets the path to the template to use as content for the jail.local configuration file -# If defined, fail2ban jails config file has: content => content("$jails_template") +# Sets the path to the template to use as content for the jail.local +# configuration file +# If defined, fail2ban jails config file has: +# content => content("$jails_template") # Note source and template parameters are mutually exclusive: don't use both # # [*jails*] -# When using [*jails_template*] you can have some control on what jail is enabled or not -# setting an array named "jails", containing the names of the jail you want enabled. +# When using [*jails_template*] you can have some control on what jail is +# enabled or not setting an array named "jails", containing the names of the +# jail you want enabled. # # [*jails_template_header*] # Path to the template to use as header with concat diff --git a/manifests/jail.pp b/manifests/jail.pp index d7ad5d8..196baba 100644 --- a/manifests/jail.pp +++ b/manifests/jail.pp @@ -6,18 +6,20 @@ # If not set, defaults to == $title # $order - The order in the jail.local file. # Default 50. Generally you don't need to change it -# $status - enabled / disabled. If disabled, the rule _IS ADDED_ to the jail.local file -# but it will not be active. Compare with the next one. +# $status - enabled / disabled. If disabled, the rule _IS ADDED_ to the +# jail.local file but it will not be active. Compare with the +# next one. # Defaults to enabled -# $enable - true / false. If false, the rule _IS NOT ADDED_ to the jail.local file +# $enable - true / false. If false, the rule _IS NOT ADDED_ to the +# jail.local file # Defaults to true # $filter - The filter rule to use. # If empty, defaults to == $jailname. # $port - The port to filter. It can be an array of ports. # $logpath - The log file to monitor # $maxretry - How many fails are acceptable -# $action - The action to take when fail2ban finds $maxretry $filter-matching records in -# $logpath +# $action - The action to take when fail2ban finds $maxretry $filter-matching +# records in $logpath # $bantime - How much time to apply the ban, in seconds define fail2ban::jail ( @@ -51,7 +53,8 @@ define fail2ban::jail ( default => true, } - # If we don't specify a filter, we take as a default the jailname as filtername + # If we don't specify a filter, we take as a default the + # jailname as filtername $real_filter = $filter ? { '' => $real_jailname, default => $filter, diff --git a/manifests/params.pp b/manifests/params.pp index deb520b..3e4dd30 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -63,7 +63,8 @@ class fail2ban::params { # Define how you want to manage jails configuration: # "file" - To provide jails stanzas as a normal file # "concat" - To build them up using different fragments - # - This option, preferred, permits the use of the fail2ban::jail define + # - This option, preferred, permits the use of the + # fail2ban::jail define $jails_config = '' $jails_file = $::operatingsystem ? {