Documentation by YARD 0.9.36
-Alphabetic Index
- -Puppet Class Listing A-Z
- - -
-
-
-
|
-
File Listing
--
-
-
-
- README - - -
diff --git a/README.md b/README.md index 2317113..a8e31d8 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,13 @@ ***Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production*** +## Features +* install all required binaries including s-nail as mail program to send alerts when infected files are found +* manage required config files +* manage cronjob settings via parameters +* run cron job to scan the file system ( by default starting at root, configurable) +* manage services + ## Dependencies All dependencies must be included in the catalogue. diff --git a/doc/_index.html b/doc/_index.html deleted file mode 100644 index dc4ce47..0000000 --- a/doc/_index.html +++ /dev/null @@ -1,143 +0,0 @@ - - -
- - -
-
-
-
|
-
| t |
- - - -6 -7 -8 -9 -10 -11 -12- |
-
- # File 'manifests/init.pp', line 6
-
-class cd_clamav {
- include cd_clamav::params
-
- resources { 'firewall':
- purge => true,
- }
-}
- |
-
cd_clamav::main::config.pp Module name: cd_clamav Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -7 -8 -9 -10 -11- |
-
- # File 'manifests/main/config.pp', line 7
-
-class cd_clamav::main::config (
-
-) inherits cd_clamav::params {
- include cd_clamav::main::service
-}
- |
-
cd_clamav::main::dirs.pp Module name: cd_clamav Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22- |
-
- # File 'manifests/main/dirs.pp', line 6
-
-class cd_clamav::main::dirs (
-
-) inherits cd_clamav::params {
- 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,
- }
-}
- |
-
cd_clamav::main::files.pp Module name: cd_clamav Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37- |
-
- # File 'manifests/main/files.pp', line 6
-
-class cd_clamav::main::files (
-
-) inherits cd_clamav::params {
- 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),
- }
-}
- |
-
cd_clamav ::main::install.pp Module name: cd_clamav Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -7 -8 -9 -10 -11 -12 -13- |
-
- # File 'manifests/main/install.pp', line 7
-
-class cd_clamav::main::install (
-
-) inherits cd_clamav::params {
- package { $reqpackages:
- ensure => $pkg_ensure,
- }
-}
- |
-
cd_clamav::main::service.pp Module name: cd_clamav Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17- |
-
- # File 'manifests/main/service.pp', line 6
-
-class cd_clamav::main::service (
-
-) inherits cd_clamav::params {
- require cd_clamav::main::files
-
-# service { $cv_service:
-# ensure => running,
-# hasstatus => true,
-# hasrestart => true,
-# enable => true,
-# }
-}
- |
-
cd_clamav::params.pp Module name: cd_clamav Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64- |
-
- # File 'manifests/params.pp', line 29
-
-class cd_clamav::params (
-
-# installation
- String $reqpackages = ['clamav','clamav-update','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@.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
-
- include cd_clamav::main::config
-}
- |
-
clamav_cd::init.pp Module name: clamav_cd Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -6 -7 -8 -9 -10 -11 -12- |
-
- # File 'manifests/init.pp', line 6
-
-class clamav_cd {
- include clamav_cd::params
-
- resources { 'firewall':
- purge => true,
- }
-}
- |
-
clamav_cd::main::config.pp Module name: clamav_cd Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26- |
-
- # File 'manifests/main/config.pp', line 7
-
-class clamav_cd::main::config (
-
-) inherits clamav_cd::params {
- include clamav_cd::main::service
-
- # Ensure the SELinux boolean antivirus_can_scan_system is enabled if disabled
- exec { 'enable_antivirus_can_scan_system':
- command => '/usr/sbin/setsebool -P antivirus_can_scan_system 1',
- unless => '/usr/sbin/getsebool antivirus_can_scan_system | grep --quiet "on"',
- path => ['/usr/sbin', '/bin'],
- }
-
- # create a cron job to run a daily scan
- cron { 'clamscan':
- command => $cv_shell_script,
- user => $cv_cron_user,
- hour => $cv_cron_hour,
- minute => $cv_cron_minute,
- }
-}
- |
-
clamav_cd::main::dirs.pp Module name: clamav_cd Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22- |
-
- # File 'manifests/main/dirs.pp', line 6
-
-class clamav_cd::main::dirs (
-
-) inherits clamav_cd::params {
- require clamav_cd::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,
- }
-}
- |
-
clamav_cd::main::files.pp Module name: clamav_cd Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63- |
-
- # File 'manifests/main/files.pp', line 6
-
-class clamav_cd::main::files (
-
-) inherits clamav_cd::params {
- require clamav_cd::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),
- }
-
- # freshclam service config file
- file { $cv_freshclam_svc :
- ensure => file,
- owner => 'root',
- group => 'root',
- mode => '0600',
- selrange => s0,
- selrole => object_r,
- seltype => etc_t,
- seluser => system_u,
- content => template($cv_freshclam_svc_erb),
- }
-
- # shell script for scanning and alerting
- file { $cv_shell_script :
- ensure => file,
- owner => 'root',
- group => 'root',
- mode => '0750',
- selrange => s0,
- selrole => object_r,
- seltype => etc_t,
- seluser => system_u,
- content => template($cv_shell_script_erb),
- }
-}
- |
-
clamav_cd ::main::install.pp Module name: clamav_cd Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -7 -8 -9 -10 -11 -12 -13 -14 -15- |
-
- # File 'manifests/main/install.pp', line 7
-
-class clamav_cd::main::install (
-
-) inherits clamav_cd::params {
- require resources_cd::main::epel
-
- package { $reqpackages:
- ensure => $pkg_ensure,
- }
-}
- |
-
clamav_cd::main::service.pp Module name: clamav_cd Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24- |
-
- # File 'manifests/main/service.pp', line 6
-
-class clamav_cd::main::service (
-
-) inherits clamav_cd::params {
- require clamav_cd::main::files
-
- service { $cv_service:
- ensure => running,
- hasstatus => true,
- hasrestart => true,
- enable => true,
- }
-
- service { $cv_freshclam:
- ensure => running,
- hasstatus => true,
- hasrestart => true,
- enable => true,
- }
-}
- |
-
clamav_cd::params.pp Module name: clamav_cd Author: Arne Teuke (arne_teuke@confdroid.com)
- -
- - - -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -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- |
-
- # File 'manifests/params.pp', line 37
-
-class clamav_cd::params (
-
-# installation
- Array $reqpackages = ['clamav','clamd','s-nail'],
- 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',
- 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',
-
-
-) {
- # 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'
- $cv_shell_script = "${cv_config_d_dir}/scan.sh"
- $cv_shell_script_erb = 'clamav_cd/scan.sh.erb'
-
- # includes must be last
-
- include clamav_cd::main::config
-}
- |
-