Files
confdroid_fail2ban/manifests/main/files.pp
2026-03-11 12:12:23 +01:00

93 lines
2.4 KiB
Puppet

## confdroid_fail2ban::main::files.pp
# Module name: confdroid_fail2ban
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages all configuration files required for confdroid_fail2ban.
##############################################################################
class confdroid_fail2ban::main::files (
) inherits confdroid_fail2ban::params {
require confdroid_fail2ban::main::dirs
if $fn_manage_config == true {
# manage fail2ban.conf
file { $fn_fail2ban_conf_file:
ensure => file,
path => $fn_fail2ban_conf_file,
owner => 'root',
group => 'root',
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template($fn_fail2ban_conf_erb),
notify => Service[$fn_service],
}
# manage fail2ban.local
file { $fn_fail2ban_local_file:
ensure => file,
path => $fn_fail2ban_local_file,
owner => 'root',
group => 'root',
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template($fn_fail2ban_local_erb),
notify => Service[$fn_service],
}
# manage jail.conf
file { $fn_jail_conf_file:
ensure => file,
path => $fn_jail_conf_file,
owner => 'root',
group => 'root',
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template($fn_jail_conf_erb),
notify => Service[$fn_service],
}
# manage jail.local
file { $fn_jail_local_file:
ensure => file,
path => $fn_jail_local_file,
owner => 'root',
group => 'root',
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template($fn_jail_local_erb),
notify => Service[$fn_service],
}
# manage paths-common.conf
file { $fn_paths_common_file:
ensure => file,
path => $fn_paths_common_file,
owner => 'root',
group => 'root',
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template($fn_paths_common_erb),
notify => Service[$fn_service],
}
}
}