Files
confdroid_clamav/manifests/params.pp

65 lines
2.5 KiB
ObjectPascal
Raw Normal View History

2019-10-28 17:40:12 +01:00
## cd_clamav::params.pp
# Module name: cd_clamav
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class holds all parameters for the cd_clamav module and is
# inherited by all classes except defines.
# @param [String] reqpackages List of packages to install.
# @param [String] pkg_ensure
2019-10-28 17:40:12 +01:00
# 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
2019-12-26 19:10:20 +01:00
# 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
2019-12-26 19:10:20 +01:00
# but drastically increases the log size.
# @param [String] cv_logsyslog Use system logger (can work together with
2019-12-26 19:10:20 +01:00
# LogFile).
# @param [String] cv_logfacility type of syslog messages - please refer to
2019-12-26 19:10:20 +01:00
# 'man syslog'for facility names
# @param [String] cv_logverbose Whether to log verbose.
# @param [String] cv_logrotate whether to enable log rotation. Always enabled
2019-12-26 19:10:20 +01:00
# when LogFileMaxSize is enabled.
# @param [String] cv_preludeenable whether to enable prelude output.
# @param [String] cv_preludeanalyzername name of the analyzer used by
2019-12-26 19:10:20 +01:00
# prelude-admin.
2019-10-28 17:40:12 +01:00
##############################################################################
class cd_clamav::params (
# installation
String $reqpackages = ['clamav','clamav-update','clamd'],
String $pkg_ensure = 'present',
2019-12-26 19:10:20 +01:00
# 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',
2019-10-28 17:40:12 +01:00
) {
# service
$cv_service = 'clamd@.service'
2019-10-28 17:40:12 +01:00
# dirs
$cv_config_d_dir = '/etc/clamd.d'
2019-12-26 18:32:41 +01:00
# 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'
2019-10-28 17:40:12 +01:00
# includes must be last
2019-10-28 17:40:12 +01:00
include cd_clamav::main::config
}