Files
confdroid_fail2ban/manifests/main/files.pp

93 lines
2.4 KiB
ObjectPascal
Raw Normal View History

2026-03-11 12:12:23 +01:00
## confdroid_fail2ban::main::files.pp
# Module name: confdroid_fail2ban
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages all configuration files required for confdroid_fail2ban.
2017-08-03 13:07:42 +01:00
##############################################################################
2026-03-11 12:12:23 +01:00
class confdroid_fail2ban::main::files (
2017-08-03 13:07:42 +01:00
2026-03-11 12:12:23 +01:00
) inherits confdroid_fail2ban::params {
require confdroid_fail2ban::main::dirs
2017-08-03 13:07:42 +01:00
if $fn_manage_config == true {
# manage fail2ban.conf
file { $fn_fail2ban_conf_file:
2025-03-02 23:30:48 +01:00
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:
2025-03-02 23:30:48 +01:00
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],
}
2017-08-13 14:55:59 +01:00
# manage jail.conf
2017-08-03 17:25:10 +01:00
file { $fn_jail_conf_file:
2025-03-02 23:30:48 +01:00
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],
2017-08-03 17:25:10 +01:00
}
2017-08-13 14:55:59 +01:00
# manage jail.local
2017-08-03 17:29:36 +01:00
file { $fn_jail_local_file:
2025-03-02 23:30:48 +01:00
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],
2017-08-03 17:29:36 +01:00
}
2017-08-13 14:55:59 +01:00
# manage paths-common.conf
file { $fn_paths_common_file:
2025-03-02 23:30:48 +01:00
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],
2017-08-13 14:55:59 +01:00
}
}
2017-08-03 13:07:42 +01:00
}