68 lines
2.7 KiB
ObjectPascal
68 lines
2.7 KiB
ObjectPascal
## clamav_cd::params.pp
|
|
# Module name: clamav_cd
|
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
|
# @summary Class holds all parameters for the clamav_cd module and is
|
|
# inherited by all classes except defines.
|
|
# @param [Array] reqpackages List of packages to install.
|
|
# @param [String] pkg_ensure
|
|
# which [package type](https://confdroid.com/2017/05/puppet-type-package/)
|
|
# to choose, i.e. `latest` or `present`.
|
|
# @param [String] cv_logfile where to log messages for the clamd service.
|
|
# @param [String] cv_logfileunlock whether log file should be locked for
|
|
# writing -the lock protects against running clamd multiple times
|
|
# @param [String] cv_logfilemaxsize the max size for the logfile. This also
|
|
# enables logrotation.
|
|
# @param [String] cv_logtime Whether to log the time with each message.
|
|
# @param [String] cv_logclean whether to log clean files. Useful in debugging
|
|
# but drastically increases the log size.
|
|
# @param [String] cv_logsyslog Use system logger (can work together with
|
|
# LogFile).
|
|
# @param [String] cv_logfacility type of syslog messages - please refer to
|
|
# 'man syslog'for facility names
|
|
# @param [String] cv_logverbose Whether to log verbose.
|
|
# @param [String] cv_logrotate whether to enable log rotation. Always enabled
|
|
# when LogFileMaxSize is enabled.
|
|
# @param [String] cv_preludeenable whether to enable prelude output.
|
|
# @param [String] cv_preludeanalyzername name of the analyzer used by
|
|
# prelude-admin.
|
|
##############################################################################
|
|
class clamav_cd::params (
|
|
|
|
# installation
|
|
Array $reqpackages = ['clamav','clamd'],
|
|
String $pkg_ensure = 'present',
|
|
|
|
# clamd
|
|
String $cv_logfile = '/var/log/clamd.scan',
|
|
String $cv_logfileunlock = 'no',
|
|
String $cv_logfilemaxsize = '2M',
|
|
String $cv_logtime = 'yes',
|
|
String $cv_logclean = 'no',
|
|
String $cv_logsyslog = 'yes',
|
|
String $cv_logfacility = 'LOG_MAIL',
|
|
String $cv_logverbose = 'no',
|
|
String $cv_logrotate = 'yes',
|
|
String $cv_preludeenable = 'no',
|
|
String $cv_preludeanalyzername = 'ClamAV',
|
|
|
|
) {
|
|
# service
|
|
$cv_service = 'clamd@scan'
|
|
$cv_freshclam = 'freshclam'
|
|
|
|
# dirs
|
|
$cv_config_d_dir = '/etc/clamd.d'
|
|
|
|
# files
|
|
$cv_clamd_config_file = "${cv_config_d_dir}/scan.conf"
|
|
$cv_clamd_config_erb = 'clamav_cd/scan_conf.erb'
|
|
$cv_freshclam_file = '/etc/freshclam.conf'
|
|
$cv_freshclam_erb = 'clamav_cd/freshclam_conf.erb'
|
|
$cv_freshclam_svc = '/usr/lib/systemd/system/freshclam.service'
|
|
$cv_freshclam_svc_erb = 'clamav_cd/freshclam_svc.erb'
|
|
|
|
# includes must be last
|
|
|
|
include clamav_cd::main::config
|
|
}
|