Compare commits

..

1 Commits

Author SHA1 Message Date
Jenkins
3335b44713 Merge branch 'jenkins-build-14' into 'master'
Auto-merge for build 14

See merge request puppet/confdroid_ssh!14
2026-04-09 15:01:54 +02:00
4 changed files with 39 additions and 13 deletions

View File

@@ -111,7 +111,16 @@
13
14
15
16</pre>
16
17
18
19
20
21
22
23
24
25</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/firewall/iptables.pp', line 6</span>
@@ -119,8 +128,17 @@
class confdroid_ssh::firewall::iptables (
) inherits confdroid_ssh::params {
case $ssh_use_firewall {
true, &#39;true&#39;, &#39;yes&#39;, &#39;1&#39;: {
$ssh_fw_ensure = &#39;present&#39;
}
default: {
$ssh_fw_ensure = &#39;absent&#39;
}
}
firewall { &quot;${ssh_fw_order}${ssh_fw_port} allow SSH on port ${ssh_fw_port}&quot;:
ensure =&gt; $ssh_use_firewall,
ensure =&gt; $ssh_fw_ensure,
proto =&gt; &#39;tcp&#39;,
source =&gt; $ssh_source_range,
dport =&gt; $ssh_fw_port,

View File

@@ -151,15 +151,15 @@
<span class='name'>ssh_use_firewall</span>
<span class='type'>(<tt>String</tt>)</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>&#39;present&#39;</tt>)</em>
<em class="default">(defaults to: <tt>true</tt>)</em>
&mdash;
<div class='inline'>
<p>whether set the fw rule to present or absent.</p>
<p>whether to manage firewall settings</p>
</div>
</li>
@@ -355,6 +355,7 @@
<pre class="lines">
19
20
21
22
@@ -394,11 +395,10 @@
56
57
58
59
60</pre>
59</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 20</span>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 19</span>
class confdroid_ssh::params (
@@ -406,7 +406,7 @@ class confdroid_ssh::params (
String $pkg_ensure = &#39;present&#39;,
# firewall settings
String $ssh_use_firewall = &#39;present&#39;,
Boolean $ssh_use_firewall = true,
String $ssh_fw_port = &#39;22&#39;,
String $ssh_fw_order = &#39;50&#39;,
String $ssh_source_range = &#39;0.0.0.0/0&#39;,

View File

@@ -6,8 +6,17 @@
class confdroid_ssh::firewall::iptables (
) inherits confdroid_ssh::params {
case $ssh_use_firewall {
true, 'true', 'yes', '1': {
$ssh_fw_ensure = 'present'
}
default: {
$ssh_fw_ensure = 'absent'
}
}
firewall { "${ssh_fw_order}${ssh_fw_port} allow SSH on port ${ssh_fw_port}":
ensure => $ssh_use_firewall,
ensure => $ssh_fw_ensure,
proto => 'tcp',
source => $ssh_source_range,
dport => $ssh_fw_port,

View File

@@ -4,8 +4,7 @@
# @summary Class contains all class parameters for confdroid_ssh
# @param [Array] ssh_reqpackages packages to install
# @param [String] pkg_ensure version to install: 'present' or 'latest'
# @param [String] ssh_use_firewall whether set the fw rule to
# present or absent.
# @param [Boolean] ssh_use_firewall whether to manage firewall settings
# @param [String] ssh_fw_port port to use for SSHD and in fw
# @param [String] ssh_fw_order order of firewall rule
# @param [String] ssh_source_range source range for firewall rule
@@ -23,7 +22,7 @@ class confdroid_ssh::params (
String $pkg_ensure = 'present',
# firewall settings
String $ssh_use_firewall = 'present',
Boolean $ssh_use_firewall = true,
String $ssh_fw_port = '22',
String $ssh_fw_order = '50',
String $ssh_source_range = '0.0.0.0/0',