Merge branch 'jenkins-build-18' into 'master'

Auto-merge for build 18

See merge request puppet/clamav_cd!15
This commit is contained in:
Jenkins
2026-09-14 09:51:27 +00:00
5 changed files with 123 additions and 27 deletions

View File

@@ -4,6 +4,7 @@
"authenticode", "authenticode",
"behaviour", "behaviour",
"bofh", "bofh",
"clamav",
"clamd", "clamd",
"clamonacc", "clamonacc",
"clamscan", "clamscan",

View File

@@ -119,7 +119,25 @@
21 21
22 22
23 23
24</pre> 24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/main/service.pp', line 6</span> <pre class="code"><span class="info file"># File 'manifests/main/service.pp', line 6</span>
@@ -129,19 +147,37 @@ class clamav_cd::main::service (
) inherits clamav_cd::params { ) inherits clamav_cd::params {
require clamav_cd::main::files require clamav_cd::main::files
if $cv_enable_clamd == true {
service { $cv_service: service { $cv_service:
ensure =&gt; running, ensure =&gt; running,
hasstatus =&gt; true, hasstatus =&gt; true,
hasrestart =&gt; true, hasrestart =&gt; true,
enable =&gt; true, enable =&gt; true,
} }
} else {
service { $cv_service:
ensure =&gt; stopped,
hasstatus =&gt; true,
hasrestart =&gt; true,
enable =&gt; false,
}
}
if $cv_enable_freshclam == true {
service { $cv_freshclam: service { $cv_freshclam:
ensure =&gt; running, ensure =&gt; running,
hasstatus =&gt; true, hasstatus =&gt; true,
hasrestart =&gt; true, hasrestart =&gt; true,
enable =&gt; true, enable =&gt; true,
} }
} else {
service { $cv_freshclam:
ensure =&gt; stopped,
hasstatus =&gt; true,
hasrestart =&gt; true,
enable =&gt; false,
}
}
}</pre> }</pre>
</td> </td>
</tr> </tr>

View File

@@ -481,6 +481,42 @@ inherited by all classes except defines.
&mdash; &mdash;
<div class='inline'> <div class='inline'>
<p>location and name of the alert file</p> <p>location and name of the alert file</p>
</div>
</li>
<li>
<span class='name'>cv_enable_freshclam</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>true</tt>)</em>
&mdash;
<div class='inline'>
<p>whether to enable the freshclam service</p>
</div>
</li>
<li>
<span class='name'>cv_enable_clamd</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>true</tt>)</em>
&mdash;
<div class='inline'>
<p>whether to enable the clamd service</p>
</div> </div>
</li> </li>
@@ -496,8 +532,6 @@ inherited by all classes except defines.
<pre class="lines"> <pre class="lines">
37
38
39 39
40 40
41 41
@@ -545,10 +579,13 @@ inherited by all classes except defines.
83 83
84 84
85 85
86</pre> 86
87
88
89</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 37</span> <pre class="code"><span class="info file"># File 'manifests/params.pp', line 39</span>
class clamav_cd::params ( class clamav_cd::params (
@@ -576,7 +613,8 @@ class clamav_cd::params (
String $cv_cron_user = &#39;root&#39;, String $cv_cron_user = &#39;root&#39;,
String $cv_scan_dir = &#39;/&#39;, String $cv_scan_dir = &#39;/&#39;,
String $cv_alert_file = &#39;tmp/clamav-alert.txt&#39;, String $cv_alert_file = &#39;tmp/clamav-alert.txt&#39;,
Boolean $cv_enable_freshclam = true,
Boolean $cv_enable_clamd = true,
) { ) {
# service # service

View File

@@ -8,17 +8,35 @@ class clamav_cd::main::service (
) inherits clamav_cd::params { ) inherits clamav_cd::params {
require clamav_cd::main::files require clamav_cd::main::files
if $cv_enable_clamd == true {
service { $cv_service: service { $cv_service:
ensure => running, ensure => running,
hasstatus => true, hasstatus => true,
hasrestart => true, hasrestart => true,
enable => true, enable => true,
} }
} else {
service { $cv_service:
ensure => stopped,
hasstatus => true,
hasrestart => true,
enable => false,
}
}
if $cv_enable_freshclam == true {
service { $cv_freshclam: service { $cv_freshclam:
ensure => running, ensure => running,
hasstatus => true, hasstatus => true,
hasrestart => true, hasrestart => true,
enable => true, enable => true,
} }
} else {
service { $cv_freshclam:
ensure => stopped,
hasstatus => true,
hasrestart => true,
enable => false,
}
}
} }

View File

@@ -33,6 +33,8 @@
# @param [String] cv_cron_user which user should run the cron job # @param [String] cv_cron_user which user should run the cron job
# @param [String] cv_scan_dir which directory should be scanned # @param [String] cv_scan_dir which directory should be scanned
# @param [String] cv_alert_file location and name of the alert file # @param [String] cv_alert_file location and name of the alert file
# @param [Boolean] cv_enable_freshclam whether to enable the freshclam service
# @param [Boolean] cv_enable_clamd whether to enable the clamd service
############################################################################## ##############################################################################
class clamav_cd::params ( class clamav_cd::params (
@@ -60,7 +62,8 @@ class clamav_cd::params (
String $cv_cron_user = 'root', String $cv_cron_user = 'root',
String $cv_scan_dir = '/', String $cv_scan_dir = '/',
String $cv_alert_file = 'tmp/clamav-alert.txt', String $cv_alert_file = 'tmp/clamav-alert.txt',
Boolean $cv_enable_freshclam = true,
Boolean $cv_enable_clamd = true,
) { ) {
# service # service