added more file controls

This commit is contained in:
Arne Teuke
2017-08-03 17:29:36 +01:00
parent e4cfd9c566
commit d33c85b30d
2 changed files with 18 additions and 1 deletions

View File

@@ -76,5 +76,21 @@ class cd_fail2ban::main::files (
notify => Service[$fn_service],
}
# manage jail.local
file { $fn_jail_local_file:
ensure => present,
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],
}
}
}

View File

@@ -173,7 +173,8 @@ $fn_fail2ban_local_file = "${fn_main_dir}/fail2ban.local"
$fn_fail2ban_local_erb = 'cd_fail2ban/fail2ban_local.erb'
$fn_jail_conf_file = "${fn_main_dir}/jail.conf"
$fn_jail_conf_erb = 'cd_fail2ban/jail_conf.erb'
$fn_jail_local_file = "${fn_main_dir}/jail.local"
$fn_jail_local_erb = 'cd_fail2ban/jail_local.erb'
# includes must be last