Readme
- +[[TOC]]
@@ -68,7 +68,7 @@Clamav is a powerful antivirus scanner with several components.
cd_clamav is a puppet module to manage clamav installations and configurations.
clamav_cd is a puppet module to manage clamav installations and configurations.
WARNING
@@ -89,14 +89,14 @@via site.pp or nodes.pp
node 'example.example.net' {
- include cd_clamav
+ include clamav_cd
}
-
through Foreman:
In order to apply parameters through Foreman, cd_clamav::params must be added to the host or host group in question.
+In order to apply parameters through Foreman, clamav_cd::params must be added to the host or host group in question.
See more details about class deployment on Confdroid.com.
@@ -110,9 +110,9 @@Support
-
-
OS: CentOS 7
+OS: Rocky 9
-
-
Puppet 5
+Puppet 6-8
Tests
@@ -122,20 +122,12 @@excluded tests:
-
---no-class_inherits_from_params_class-check:relevant only to non-supported outdated puppet versions -
-
---no-variable_scope-check: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters. -
-
---no-80chars-check: it is not always possible to stay within 80 characters, although typically only occurring on the parameter vaultparams.pp. -
-
--no-arrow_alignment-check: this check leads to actually not having am easily readable arrow alignment, as this checksper block, not per class.
Puppet Parser
ERB Template Parser
Test for unwanted UTF8 files in the Puppet code (see tests/UTF_Files)
-Sonar Quality Gate
Readme
- +[[TOC]]
@@ -68,7 +68,7 @@Clamav is a powerful antivirus scanner with several components.
cd_clamav is a puppet module to manage clamav installations and configurations.
clamav_cd is a puppet module to manage clamav installations and configurations.
WARNING
@@ -89,14 +89,14 @@via site.pp or nodes.pp
node 'example.example.net' {
- include cd_clamav
+ include clamav_cd
}
-
through Foreman:
In order to apply parameters through Foreman, cd_clamav::params must be added to the host or host group in question.
+In order to apply parameters through Foreman, clamav_cd::params must be added to the host or host group in question.
See more details about class deployment on Confdroid.com.
@@ -110,9 +110,9 @@Support
-
-
OS: CentOS 7
+OS: Rocky 9
-
-
Puppet 5
+Puppet 6-8
Tests
@@ -122,20 +122,12 @@excluded tests:
-
---no-class_inherits_from_params_class-check:relevant only to non-supported outdated puppet versions -
-
---no-variable_scope-check: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters. -
-
---no-80chars-check: it is not always possible to stay within 80 characters, although typically only occurring on the parameter vaultparams.pp. -
-
--no-arrow_alignment-check: this check leads to actually not having am easily readable arrow alignment, as this checksper block, not per class.
Puppet Parser
ERB Template Parser
Test for unwanted UTF8 files in the Puppet code (see tests/UTF_Files)
-Sonar Quality Gate
-
-
- +
- -
- +
- -
- +
- -
- +
- -
- +
- -
- +
- -
- +
- diff --git a/doc/puppet_classes/clamav_cd.html b/doc/puppet_classes/clamav_cd.html new file mode 100644 index 0000000..af7fc10 --- /dev/null +++ b/doc/puppet_classes/clamav_cd.html @@ -0,0 +1,129 @@ + + + + + +
- Defined in: +
- + manifests/init.pp + +
- Inherits: +
- clamav_cd::params +
- Defined in: +
- + manifests/main/config.pp + +
- Inherits: +
- clamav_cd::params +
- Defined in: +
- + manifests/main/dirs.pp + +
- Inherits: +
- clamav_cd::params +
- Defined in: +
- + manifests/main/files.pp + +
- Inherits: +
- clamav_cd::params +
- Defined in: +
- + manifests/main/install.pp + +
- Inherits: +
- clamav_cd::params +
- Defined in: +
- + manifests/main/service.pp + +
- Inherited by: +
-
+
+ clamav_cd::main::dirs
+ + clamav_cd::main::files
+ + clamav_cd::main::config
+ + clamav_cd::main::install
+ + clamav_cd::main::service
+ +
+ - Defined in: +
- + manifests/params.pp + +
Puppet Class: clamav_cd
+-
+
Summary
+ Class initializes the clamav_cd Module. + +Overview
+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,
+ }
+}
+ |
+
Puppet Class: clamav_cd::main::config
+-
+
-
+
Summary
+ Class manages all aspects of configuring the module logic for +clamav_cd. + +Overview
+clamav_cd::main::config.pp Module name: clamav_cd Author: Arne Teuke (arne_teuke@confdroid.com)
+ +
+ + + +7 +8 +9 +10 +11+ |
+
+ # File 'manifests/main/config.pp', line 7
+
+class clamav_cd::main::config (
+
+) inherits clamav_cd::params {
+ include clamav_cd::main::service
+}
+ |
+
Puppet Class: clamav_cd::main::dirs
+-
+
-
+
Summary
+ Class manages all directories required for clamav_cd. + +Overview
+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,
+ }
+}
+ |
+
Puppet Class: clamav_cd::main::files
+-
+
-
+
Summary
+ Class manages all configuration files required for clamav_cd. + +Overview
+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+ |
+
+ # 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),
+ }
+}
+ |
+
Puppet Class: clamav_cd::main::install
+-
+
-
+
Summary
+ Class manage all aspects of installing binaries required for +clamav_cd + +Overview
+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,
+ }
+}
+ |
+
Puppet Class: clamav_cd::main::service
+-
+
-
+
Summary
+ Class manages the service(s) for clamav_cd. + +Overview
+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+ |
+
+ # 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,
+# }
+}
+ |
+
Puppet Class: clamav_cd::params
+-
+
-
+
Summary
+ Class holds all parameters for the clamav_cd module and is +inherited by all classes except defines. + +Overview
+clamav_cd::params.pp Module name: clamav_cd 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 clamav_cd::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 = 'clamav_cd/scan_conf.erb'
+ $cv_freshclam_file = '/etc/freshclam.conf'
+ $cv_freshclam_erb = 'clamav_cd/freshclam_conf.erb'
+
+ # includes must be last
+
+ include clamav_cd::main::config
+}
+ |
+