Documentation by YARD 0.9.36
+Alphabetic Index
+ +Puppet Class Listing A-Z
+ + +
+
+
+
|
+
File Listing
+-
+
+
+
- README + + +
diff --git a/doc/_index.html b/doc/_index.html new file mode 100644 index 0000000..c845e3e --- /dev/null +++ b/doc/_index.html @@ -0,0 +1,143 @@ + + +
+ + +
+
+
+
|
+
| t |
+ + + +6 +7 +8 +9 +10 +11 +12+ |
+
+ # File 'manifests/init.pp', line 6
+
+class confdroid_clamav {
+ include confdroid_clamav::params
+
+ resources { 'firewall':
+ purge => true,
+ }
+}
+ |
+
confdroid_clamav::main::config.pp Module name: confdroid_clamav Author: 12ww1160 (12ww1160@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 confdroid_clamav::main::config (
+
+) inherits confdroid_clamav::params {
+ include confdroid_clamav::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,
+ }
+}
+ |
+
confdroid_clamav::main::dirs.pp Module name: confdroid_clamav Author: 12ww1160 (12ww1160@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 confdroid_clamav::main::dirs (
+
+) inherits confdroid_clamav::params {
+ require confdroid_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,
+ }
+}
+ |
+
confdroid_clamav::main::files.pp Module name: confdroid_clamav Author: 12ww1160 (12ww1160@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 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79+ |
+
+ # File 'manifests/main/files.pp', line 6
+
+class confdroid_clamav::main::files (
+
+) inherits confdroid_clamav::params {
+ require confdroid_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),
+ notify => Service[$cv_freshclam],
+ }
+
+ # 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),
+ notify => Service[$cv_freshclam],
+ }
+
+ # clamd service config file
+# file { $cv_clamd_svc :
+# ensure => file,
+# owner => 'root',
+# group => 'root',
+# mode => '0600',
+# selrange => s0,
+# selrole => object_r,
+# seltype => etc_t,
+# seluser => system_u,
+# content => template($cv_clamd_svc_erb),
+# notify => Service[$cv_service],
+# }
+
+ # 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),
+ }
+}
+ |
+
confdroid_clamav ::main::install.pp Module name: confdroid_clamav Author: 12ww1160 (12ww1160@confdroid.com)
+ +
+ + + +7 +8 +9 +10 +11 +12 +13 +14 +15+ |
+
+ # File 'manifests/main/install.pp', line 7
+
+class confdroid_clamav::main::install (
+
+) inherits confdroid_clamav::params {
+ require confdroid_resources::main::epel
+
+ package { $cv_reqpackages:
+ ensure => $cv_pkg_ensure,
+ }
+}
+ |
+
confdroid_clamav::main::service.pp Module name: confdroid_clamav Author: 12ww1160 (12ww1160@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+ |
+
+ # File 'manifests/main/service.pp', line 6
+
+class confdroid_clamav::main::service (
+
+) inherits confdroid_clamav::params {
+ require confdroid_clamav::main::files
+
+ if $cv_enable_clamd == true {
+ service { $cv_service:
+ ensure => running,
+ hasstatus => true,
+ hasrestart => true,
+ enable => true,
+ }
+ } else {
+ service { $cv_service:
+ ensure => stopped,
+ hasstatus => true,
+ hasrestart => true,
+ enable => false,
+ }
+ }
+
+ if $cv_enable_freshclam == true {
+ service { $cv_freshclam:
+ ensure => running,
+ hasstatus => true,
+ hasrestart => true,
+ enable => true,
+ }
+ } else {
+ service { $cv_freshclam:
+ ensure => stopped,
+ hasstatus => true,
+ hasrestart => true,
+ enable => false,
+ }
+ }
+}
+ |
+
confdroid_clamav::params.pp Module name: confdroid_clamav Author: 12ww1160 (12ww1160@confdroid.com)
+ +
+ + + +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 +107 +108+ |
+
+ # File 'manifests/params.pp', line 50
+
+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',
+ String $cv_timeout_start_sec = '420'
+
+) {
+ # 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
+}
+ |
+