Files
confdroid_ssh/manifests/params.pp

43 lines
1.8 KiB
ObjectPascal
Raw Normal View History

2026-04-05 14:39:09 +02:00
## confdroid_ssh::params.pp
# Module name: confdroid_ssh
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class contains all class parameters for confdroid_ssh
2026-04-05 15:16:48 +02:00
# @param [Array] ssh_reqpackages packages to install
# @param [String] pkg_ensure version to install: 'present' or 'latest'
2026-04-09 15:06:31 +02:00
# @param [String] ssh_fw_rule whether set the fw rule to
2026-04-09 15:00:41 +02:00
# present or absent.
2026-04-05 15:16:48 +02:00
# @param [String] ssh_fw_port port to use for SSHD and in fw
# @param [String] ssh_fw_order order of firewall rule
2026-04-05 15:26:08 +02:00
# @param [String] ssh_source_range source range for firewall rule
2026-04-14 13:08:33 +02:00
###############################################################################
2026-04-05 14:39:09 +02:00
class confdroid_ssh::params (
2025-04-22 15:58:46 +02:00
2026-04-13 12:56:43 +02:00
Array $ssh_reqpackages = ['openssh','openssh-clients','openssh-server'],
String $pkg_ensure = 'present',
2026-04-05 15:16:48 +02:00
# firewall settings
2026-04-13 12:56:43 +02:00
String $ssh_fw_rule = 'present',
String $ssh_fw_port = '22',
String $ssh_fw_order = '50',
String $ssh_source_range = '0.0.0.0/0',
2025-04-22 15:58:46 +02:00
) {
2026-04-05 14:39:09 +02:00
# default facts
$fqdn = $facts['networking']['fqdn']
$hostname = $facts['networking']['hostname']
$domain = $facts['networking']['domain']
$os_name = $facts['os']['name']
$os_release = $facts['os']['release']['major']
2026-04-05 16:11:17 +02:00
$sshd_user = 'root'
$ssh_etc_path = '/etc/ssh'
$sshd_service = 'sshd'
$sshd_config_path = "${ssh_etc_path}/sshd_config"
$sshd_custom_path = "${ssh_etc_path}/sshd_config.d"
$sshd_config_erb = 'confdroid_ssh/sshd_config.erb'
$sshd_root_login_file = "${sshd_custom_path}/01-permitrootlogin.conf"
2025-04-22 15:58:46 +02:00
# includes must be last
2026-04-05 14:39:09 +02:00
include confdroid_ssh::main::config
2025-04-22 15:58:46 +02:00
}