Compare commits
1 Commits
daf98fc2e9
...
f432c7b450
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f432c7b450 |
@@ -35,12 +35,5 @@ 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],
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
# @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 (
|
||||||
|
|
||||||
@@ -28,7 +27,6 @@ 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
|
||||||
@@ -38,15 +36,14 @@ class confdroid_ssh::params (
|
|||||||
$os_name = $facts['os']['name']
|
$os_name = $facts['os']['name']
|
||||||
$os_release = $facts['os']['release']['major']
|
$os_release = $facts['os']['release']['major']
|
||||||
|
|
||||||
$sshd_user = 'root'
|
$sshd_user = 'root'
|
||||||
$ssh_etc_path = '/etc/ssh'
|
$ssh_etc_path = '/etc/ssh'
|
||||||
$sshd_service = 'sshd'
|
$sshd_service = 'sshd'
|
||||||
$sshd_config_path = "${ssh_etc_path}/sshd_config"
|
$sshd_config_path = "${ssh_etc_path}/sshd_config"
|
||||||
$sshd_custom_path = "${ssh_etc_path}/sshd_config.d"
|
$sshd_custom_path = "${ssh_etc_path}/sshd_config.d"
|
||||||
$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
|
||||||
|
|||||||
@@ -7,6 +7,4 @@
|
|||||||
|
|
||||||
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 %>
|
|
||||||
Reference in New Issue
Block a user