adds file and dirs controls

This commit is contained in:
Arne Teuke
2019-12-26 18:32:41 +01:00
parent 795543319c
commit 04b8b8d426
4 changed files with 50 additions and 4 deletions

View File

@@ -26,4 +26,16 @@ class cd_clamav::main::dirs (
require cd_clamav::main::install
# config.d dir
file { $cv_config_d_dir:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
}
}

View File

@@ -26,5 +26,31 @@ class cd_clamav::main::files (
require cd_clamav::main::dirs
# clamd config file
file { $cv_clamd_config_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template($cv_clamd_config_erb),
# notify => Service[$cv_service],
}
# freshclam config file
file { $cv_freshclam_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0600',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template($cv_freshclam_erb,
}
}

View File

@@ -28,13 +28,22 @@
class cd_clamav::params (
# installation
$reqpackages = ['clamav','clamav-update','clamd'],
$pkg_ensure = 'latest',
$reqpackages = ['clamav','clamav-update','clamd'],
$pkg_ensure = 'present',
) {
$cv_service = ''
# service
$cv_service = 'clamd@.service'
# dirs
$cv_config_d_dir = '/etc/clamd.d'
# files
$cv_clamd_config_file = "${cv_config_d_dir}/scan.conf"
$cv_clamd_config_erb = 'cd_clamav/scan_conf.erb'
$cv_freshclam_file = '/etc/freshclam.conf'
$cv_freshclam_erb = 'cd_clamav/freshclam_conf.erb'
# includes must be last

View File

@@ -8,7 +8,6 @@
## Please read the freshclam.conf(5) manual before editing this file.
##
# Comment or remove the line below.
#Example