added directory control

This commit is contained in:
Arne Teuke
2017-08-03 14:01:25 +01:00
parent 16b4aa5664
commit 3c581b56cc
3 changed files with 105 additions and 8 deletions

View File

@@ -1,12 +1,11 @@
## cd_fail2ban::main::dirs.pp
# Module name: cd_fail2ban
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# 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)
# cd_fail2ban is used for providing automatic configuration of Fail2Ban
# 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
@@ -27,6 +26,87 @@ 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,
}
}