2026-04-05 14:39:09 +02:00
|
|
|
## confdroid_ssh::main::files.pp
|
|
|
|
|
# Module name: confdroid_ssh
|
|
|
|
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
2025-04-22 15:58:46 +02:00
|
|
|
# @summary Class manages files
|
|
|
|
|
##############################################################################
|
2026-04-05 14:39:09 +02:00
|
|
|
class confdroid_ssh::main::files (
|
|
|
|
|
) inherits confdroid_ssh::params {
|
|
|
|
|
require confdroid_ssh::main::dirs
|
2025-04-22 15:58:46 +02:00
|
|
|
|
|
|
|
|
file { $sshd_config_path:
|
|
|
|
|
ensure => file,
|
|
|
|
|
path => $sshd_config_path,
|
2026-04-05 15:40:23 +02:00
|
|
|
owner => $sshd_user,
|
|
|
|
|
group => $sshd_user,
|
2025-04-22 15:58:46 +02:00
|
|
|
mode => '0640',
|
|
|
|
|
selrange => s0,
|
|
|
|
|
selrole => object_r,
|
|
|
|
|
seltype => etc_t,
|
|
|
|
|
seluser => system_u,
|
|
|
|
|
content => template($sshd_config_erb),
|
2026-04-05 15:52:15 +02:00
|
|
|
notify => Service[$sshd_service],
|
2025-04-22 15:58:46 +02:00
|
|
|
}
|
2026-04-05 15:35:39 +02:00
|
|
|
|
|
|
|
|
if $ssh_manage_config {
|
2026-04-05 15:40:23 +02:00
|
|
|
file { $sshd_custom_conf:
|
2026-04-14 12:27:40 +02:00
|
|
|
ensure => $ssh_custom_ensure,
|
2026-04-05 15:40:23 +02:00
|
|
|
path => $sshd_custom_conf,
|
|
|
|
|
owner => $sshd_user,
|
|
|
|
|
group => $sshd_user,
|
2026-04-05 15:46:34 +02:00
|
|
|
mode => '0640',
|
2026-04-05 15:40:23 +02:00
|
|
|
selrange => s0,
|
|
|
|
|
selrole => object_r,
|
|
|
|
|
seltype => etc_t,
|
|
|
|
|
seluser => system_u,
|
|
|
|
|
content => template($sshd_custom_erb),
|
2026-04-05 15:52:15 +02:00
|
|
|
notify => Service[$sshd_service],
|
2026-04-05 15:35:39 +02:00
|
|
|
}
|
|
|
|
|
}
|
2025-04-22 15:58:46 +02:00
|
|
|
}
|