Files
confdroid_clamav/manifests/params.pp

72 lines
2.9 KiB
ObjectPascal
Raw Normal View History

2025-06-08 12:21:40 +02:00
## clamav_cd::params.pp
# Module name: clamav_cd
2019-10-28 17:40:12 +01:00
# Author: Arne Teuke (arne_teuke@confdroid.com)
2025-06-08 12:21:40 +02:00
# @summary Class holds all parameters for the clamav_cd module and is
2019-10-28 17:40:12 +01:00
# inherited by all classes except defines.
2025-06-08 12:32:47 +02:00
# @param [Array] 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.
2025-06-08 14:04:15 +02:00
# @param [String] cv_tcpsocket socket port
# @param [String] cv_tcpaddress ip address to listen on
2019-10-28 17:40:12 +01:00
##############################################################################
2025-06-08 12:21:40 +02:00
class clamav_cd::params (
2019-10-28 17:40:12 +01:00
# installation
2025-06-08 14:04:15 +02:00
Array $reqpackages = ['clamav','clamd'],
String $pkg_ensure = 'present',
2019-12-26 19:10:20 +01:00
# clamd
2025-06-08 14:04:15 +02:00
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',
String $cv_tcpsocket = '3310',
String $cv_tcpaddress = '127.0.0.1',
2019-10-28 17:40:12 +01:00
) {
# service
2025-06-08 13:50:09 +02:00
$cv_service = 'clamd@scan'
2025-06-08 13:38:05 +02:00
$cv_freshclam = 'freshclam'
2019-10-28 17:40:12 +01:00
# dirs
2025-06-08 13:38:05 +02:00
$cv_config_d_dir = '/etc/clamd.d'
2019-12-26 18:32:41 +01:00
# files
2025-06-08 13:38:05 +02:00
$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'
2019-10-28 17:40:12 +01:00
# includes must be last
2019-10-28 17:40:12 +01:00
2025-06-08 12:21:40 +02:00
include clamav_cd::main::config
2019-10-28 17:40:12 +01:00
}