From ab94577ae7093a2a24b2b555f6750d00c74c690c Mon Sep 17 00:00:00 2001
From: Jenkins Server
- No issue
-dc918f331ab225f Arne Teuke 2017-08-03 11:01:32
+82035d505ca0352 Arne Teuke 2017-08-03 12:13:00
initial commit
+added service control
+
+
+
+
|Repo Name| version | Build
Status|
|---|---|---|---|
-|cd_fail2ban| 0.0.0.2 | cd_fail2ban| 0.0.0.3 | {Build
Status/]|
firewalld: firewalld is auto-installed on CentOS7 as dependency of fail2ban +by yum.
+|Repo Name| version | Build
Status|
|---|---|---|---|
-|cd_fail2ban| 0.0.0.2 | cd_fail2ban| 0.0.0.3 | {Build
Status/]|
firewalld: firewalld is auto-installed on CentOS7 as dependency of fail2ban +by yum.
+cd_fail2ban::main::dirs.pp Module name: cd_fail2ban Author: Arne Teuke -(arne_teuke@ConfDroid.com)
+(arne_teuke@confdroid.com) +License: + This file is part of cd_fail2ban. -cd_fail2ban is used for providing automatic configuration of Fail2Ban -
This file is part of cd_fail2ban.
- -cd_fail2ban is used for providing automatic configuration of - <service / -purpose> - Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) - This -program is free software: you can redistribute it and/or modify - it under -the terms of the GNU General Public License as published by - the Free -Software Foundation, either version 3 of the License, or - (at your option) -any later version.
+Copyright (C) 2017 confdroid (copyright@confdroid.com) + This program is +free software: you can redistribute it and/or modify + it under the terms of +the GNU General Public License as published by + the Free Software +Foundation, either version 3 of the License, or + (at your option) any later +version.This program is distributed in the hope that it will be useful, but @@ -130,6 +127,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.
+23 24 25 26 @@ -138,10 +136,90 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/. 29 30 31 -32+32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112
# File 'manifests/main/dirs.pp', line 24
+ # File 'manifests/main/dirs.pp', line 23
class cd_fail2ban::main::dirs (
@@ -149,8 +227,89 @@ class cd_fail2ban::main::dirs (
require cd_fail2ban::main::install
+ # manage main dir
+ file { $fn_main_dir:
+ ensure => directory,
+ path => $fn_main_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
+ # manage action.d dir
+
+ file { $fn_action_d_dir:
+ ensure => directory,
+ path => $fn_action_d_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
+
+ # manage fail2ban.d dir
+
+ file { $fn_fail2ban_d_dir:
+ ensure => directory,
+ path => $fn_fail2ban_d_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
+
+ # manage filter.d dir
+
+ file { $fn_filter_d_dir:
+ ensure => directory,
+ path => $fn_filter_d_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
+
+ # manage jail.d dir
+
+ file { $fn_jail_d_dir:
+ ensure => directory,
+ path => $fn_jail_d_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
+
+ # manage /var/lib/fail2ban
+
+ file { $fn_var_lib_dir:
+ ensure => directory,
+ path => $fn_var_lib_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
}
latest or present.
44
45
46
-47
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
# File 'manifests/params.pp', line 27 @@ -212,11 +227,26 @@ $fn_enable_fail2ban = true, # installation section $reqpackages = $::operatingsystem ? { - /(?i-mx:centos|fedora|redhat)/ => ['fail2ban'], + /(?i-mx:centos|fedora|redhat)/ => ['fail2ban','fail2ban-firewalld', + 'fail2ban-sendmail', + 'fail2ban-server.noarch'], } + + # service -$fn_service = 'fail2ban' +$fn_service = 'fail2ban' + +# directories +$fn_main_dir = '/etc/fail2ban' +$fn_action_d_dir = "${fn_main_dir}/action.d" +$fn_fail2ban_d_dir = "${fn_main_dir}/fail2ban.d" +$fn_filter_d_dir = "${fn_main_dir}/filter.d" +$fn_jail_d_dir = "${fn_main_dir}/jail.d" +$fn_var_lib_dir = '/var/lib/fail2ban' + + +# files # includes must be last @@ -230,7 +260,7 @@ $fn_service = 'fail2ban' diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index bcf9706..719adc9 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@