Puppet Class: confdroid_clamav::params

Summary

Class holds all parameters for the confdroid_clamav module and is inherited by all classes except defines.

Overview

confdroid_clamav::params.pp Module name: confdroid_clamav Author: 12ww1160 (12ww1160@confdroid.com)

Parameters:

  • cv_reqpackages (Array) (defaults to: ['clamav','clamd','s-nail'])

    List of packages to install.

  • cv_pkg_ensure (String) (defaults to: 'present')

    which package type to choose, i.e. latest or present.

  • cv_logfile (String) (defaults to: '/var/log/clamd.scan')

    where to log messages for the clamd service.

  • cv_logfileunlock (String) (defaults to: 'no')

    whether log file should be locked for writing -the lock protects against running clamd multiple times

  • cv_logfilemaxsize (String) (defaults to: '2M')

    the max size for the logfile. This also enables logrotation.

  • cv_logtime (String) (defaults to: 'yes')

    Whether to log the time with each message.

  • cv_logclean (String) (defaults to: 'no')

    whether to log clean files. Useful in debugging but drastically increases the log size.

  • cv_logsyslog (String) (defaults to: 'yes')

    Use system logger (can work together with LogFile).

  • cv_logfacility (String) (defaults to: 'LOG_MAIL')

    type of syslog messages - please refer to ‘man syslog’for facility names

  • cv_logverbose (String) (defaults to: 'no')

    Whether to log verbose.

  • cv_logrotate (String) (defaults to: 'yes')

    whether to enable log rotation. Always enabled when LogFileMaxSize is enabled.

  • cv_preludeenable (String) (defaults to: 'no')

    whether to enable prelude output.

  • cv_preludeanalyzername (String) (defaults to: 'ClamAV')

    name of the analyzer used by prelude-admin.

  • cv_tcpsocket (String) (defaults to: '3310')

    socket port

  • cv_tcpaddress (String) (defaults to: 'localhost')

    ip address to listen on

  • cv_alert_email (String) (defaults to: 'you@example.com')

    email address to send alerts

  • cv_cron_hour (String) (defaults to: '2')

    which hour the scan should start

  • cv_cron_minute (String) (defaults to: '0')

    which minute the scan should start

  • cv_cron_user (String) (defaults to: 'root')

    which user should run the cron job

  • cv_scan_dir (String) (defaults to: '/')

    which directory should be scanned

  • cv_alert_file (String) (defaults to: 'tmp/clamav-alert.txt')

    location and name of the alert file

  • cv_enable_freshclam (Boolean) (defaults to: true)

    whether to enable the freshclam service

  • cv_enable_clamd (Boolean) (defaults to: true)

    whether to enable the clamd service

  • cv_use_excludepaths (Boolean) (defaults to: true)

    whether to use advanced exclude paths

  • cv_concurrentdatabasereload (String) (defaults to: 'no')

    whether to enable concurrent database reloads. This is useful when you have multiple clamd instances running on the same machine. If you have only one clamd instance, this should be set to ‘no’.

  • cv_clamd_max_mem (String) (defaults to: '512M')

    maximum memory usage for clamd.

  • cv_clamd_cpu_quota (String) (defaults to: '30%')

    maximum CPU usage for clamd.

  • cv_nice_value (String) (defaults to: '19')

    nice value for clamd. This is a number between -20 and 19. The lower the number, the higher the priority. The default is 19, which is the lowest priority.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'manifests/params.pp', line 49

class confdroid_clamav::params (

# installation
  Array $cv_reqpackages               = ['clamav','clamd','s-nail'],
  String $cv_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',
  String $cv_tcpsocket                = '3310',
  String $cv_tcpaddress               = 'localhost',
  String $cv_alert_email              = 'you@example.com',
  String $cv_cron_hour                = '2',
  String $cv_cron_minute              = '0',
  String $cv_cron_user                = 'root',
  String $cv_scan_dir                 = '/',
  String $cv_alert_file               = 'tmp/clamav-alert.txt',
  Boolean $cv_enable_freshclam        = true,
  Boolean $cv_enable_clamd            = true,
  Boolean $cv_use_excludepaths        = true,
  String $cv_concurrentdatabasereload = 'no',
  String $cv_clamd_max_mem            = '512M',
  String $cv_clamd_cpu_quota          = '30%',
  String $cv_nice_value               = '19'

) {
  # 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    = 'confdroid_clamav/scan_conf.erb'
  $cv_freshclam_file      = '/etc/freshclam.conf'
  $cv_freshclam_erb       = 'confdroid_clamav/freshclam_conf.erb'
  $cv_freshclam_svc       = '/usr/lib/systemd/system/freshclam.service'
  $cv_freshclam_svc_erb   = 'confdroid_clamav/freshclam_svc.erb'
  $cv_clamd_svc           = '/usr/lib/systemd/system/clamd@.service'
  $cv_clamd_svc_erb       = 'confdroid_clamav/clamd_svc.erb'
  $cv_shell_script        = "${cv_config_d_dir}/scan.sh"
  $cv_shell_script_erb    = 'confdroid_clamav/scan.sh.erb'

  # includes must be last

  include confdroid_clamav::main::config
}