Files
confdroid_fail2ban/manifests/main/dirs.pp
2017-08-03 15:29:17 +01:00

129 lines
3.3 KiB
Puppet

## cd_fail2ban::main::dirs.pp
# Module name: cd_fail2ban
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_fail2ban.
#
# 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
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class manages all directories required for cd_fail2ban.
###############################################################################
class cd_fail2ban::main::dirs (
) inherits cd_fail2ban::params {
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 => fail2ban_var_lib_t,
seluser => system_u,
}
# manage /var/run/fail2bam
file { $fn_var_run_dir:
ensure => directory,
path => $fn_var_run_dir,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => fail2ban_var_run_t,
seluser => system_u,
}
}