Files
confdroid_fail2ban/manifests/main/files.pp

93 lines
2.4 KiB
ObjectPascal
Raw Normal View History

2025-03-02 23:30:48 +01:00
## fail2ban_cd::main::files.pp
# Module name: fail2ban_cd
2017-08-03 13:07:42 +01:00
# Author: Arne Teuke (arne_teuke@confdroid.com)
2025-03-02 23:30:48 +01:00
# @summary Class manages all configuration files required for fail2ban_cd.
2017-08-03 13:07:42 +01:00
##############################################################################
2025-03-02 23:30:48 +01:00
class fail2ban_cd::main::files (
2017-08-03 13:07:42 +01:00
2025-03-02 23:30:48 +01:00
) inherits fail2ban_cd::params {
require fail2ban_cd::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
}