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

Auto-merge for build 7

See merge request puppet/confdroid_ssh!7
This commit is contained in:
Jenkins
2026-04-05 14:12:19 +00:00
3 changed files with 21 additions and 9 deletions

View File

@@ -35,5 +35,12 @@ class confdroid_ssh::main::files (
content => template($sshd_custom_erb), content => template($sshd_custom_erb),
notify => Service[$sshd_service], notify => Service[$sshd_service],
} }
# we want the default root login setting to be managed by the custom conf,
# so we remove the default file if it exists
file { $sshd_root_login_file:
ensure => absent,
path => $sshd_root_login_file,
notify => Service[$sshd_service],
}
} }
} }

View File

@@ -11,6 +11,7 @@
# @param [Boolean] ssh_manage_config whether to manage the configuration # @param [Boolean] ssh_manage_config whether to manage the configuration
# @param [String] ssh_address_family AddressFamily setting for sshd_config # @param [String] ssh_address_family AddressFamily setting for sshd_config
# @param [String] ssh_listen_address ListenAddress setting for sshd_config # @param [String] ssh_listen_address ListenAddress setting for sshd_config
# @param [String] ssh_root_login PermitRootLogin setting for sshd_config
############################################################################## ##############################################################################
class confdroid_ssh::params ( class confdroid_ssh::params (
@@ -27,6 +28,7 @@ class confdroid_ssh::params (
Boolean $ssh_manage_config = true, Boolean $ssh_manage_config = true,
String $ssh_address_family = 'any', String $ssh_address_family = 'any',
String $ssh_listen_address = '0.0.0.0', String $ssh_listen_address = '0.0.0.0',
String $ssh_root_login = 'prohibit-password',
) { ) {
# default facts # default facts
@@ -44,6 +46,7 @@ class confdroid_ssh::params (
$sshd_custom_conf = "${sshd_custom_path}/10-custom.conf" $sshd_custom_conf = "${sshd_custom_path}/10-custom.conf"
$sshd_custom_erb = 'confdroid_ssh/sshd_custom_conf.erb' $sshd_custom_erb = 'confdroid_ssh/sshd_custom_conf.erb'
$sshd_config_erb = 'confdroid_ssh/sshd_config.erb' $sshd_config_erb = 'confdroid_ssh/sshd_config.erb'
$sshd_root_login_file = "${sshd_custom_path}/01-permitrootlogin.conf"
# includes must be last # includes must be last
include confdroid_ssh::main::config include confdroid_ssh::main::config

View File

@@ -8,3 +8,5 @@
Port <%= @ssh_fw_port %> Port <%= @ssh_fw_port %>
AddressFamily <%= @ssh_address_family %> AddressFamily <%= @ssh_address_family %>
ListenAddress <%= @ssh_listen_address %> ListenAddress <%= @ssh_listen_address %>
PermitRootLogin <%= @ssh_root_login %>