From 465a67f2084e911ac50cc777019d97300b5dc7c0 Mon Sep 17 00:00:00 2001 From: Steffen Zieger Date: Thu, 23 May 2024 18:40:18 +0200 Subject: [PATCH] fix subsystem option if use_augeas = true, fixes #376 --- manifests/server/config.pp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/manifests/server/config.pp b/manifests/server/config.pp index b7d0e80..4aa3c56 100644 --- a/manifests/server/config.pp +++ b/manifests/server/config.pp @@ -19,8 +19,15 @@ if $ssh::server::use_augeas { $options.each |String $k, Hash $v| { - sshd_config { $k: - * => $v, + if $k.downcase == 'subsystem' { + $_v = $v.match(/(^(\w+)\s+(.*)$)/) + sshd_config_subsystem { $v[2]: + command => $v[3], + } + } else { + sshd_config { $k: + * => $v, + } } } } else {