From 7702dcf24a63dd474fbc28a76647e87ff81b9495 Mon Sep 17 00:00:00 2001 From: Steffen Zieger Date: Fri, 24 May 2024 14:52:52 +0200 Subject: [PATCH] use `contain` instead of `include`, fixes #367 --- manifests/client.pp | 6 +++--- manifests/client/config/user.pp | 2 +- manifests/server.pp | 10 +++++----- manifests/server/config/setting.pp | 2 +- manifests/server/host_key.pp | 2 +- manifests/server/instances.pp | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/manifests/client.pp b/manifests/client.pp index b0be0a43..dd450646 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -52,13 +52,13 @@ $merged_options = deep_merge($options, delete($default_options, keys($options))) } - include ssh::client::install - include ssh::client::config + contain ssh::client::install + contain ssh::client::config # Provide option to *not* use storeconfigs/puppetdb, which means not managing # hostkeys and knownhosts if ($storeconfigs_enabled) { - include ssh::knownhosts + contain ssh::knownhosts Class['ssh::client::install'] -> Class['ssh::client::config'] diff --git a/manifests/client/config/user.pp b/manifests/client/config/user.pp index e61c6469..753f0e40 100644 --- a/manifests/client/config/user.pp +++ b/manifests/client/config/user.pp @@ -40,7 +40,7 @@ String[1] $ssh_directory_default_mode = '0700', String[1] $ssh_config_default_mode = '0600', ) { - include ssh::client + contain ssh::client # If a specific target file was specified, # it must have higher priority than any diff --git a/manifests/server.pp b/manifests/server.pp index f5ed7ae9..086fcf09 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -84,15 +84,15 @@ $merged_options = deep_merge($default_options, $options) } - include ssh::server::install - include ssh::server::config - include ssh::server::service + contain ssh::server::install + contain ssh::server::config + contain ssh::server::service # Provide option to *not* use storeconfigs/puppetdb, which means not managing # hostkeys and knownhosts if ($storeconfigs_enabled) { - include ssh::hostkeys - include ssh::knownhosts + contain ssh::hostkeys + contain ssh::knownhosts Class['ssh::server::install'] -> Class['ssh::server::config'] diff --git a/manifests/server/config/setting.pp b/manifests/server/config/setting.pp index 7c114f3d..de9fe9f2 100644 --- a/manifests/server/config/setting.pp +++ b/manifests/server/config/setting.pp @@ -15,7 +15,7 @@ Variant[Boolean, Array, Hash, String] $value, Variant[String[1], Integer] $order = '10' ) { - include ssh::server + contain ssh::server $real_value = $value ? { Boolean => $value ? { diff --git a/manifests/server/host_key.pp b/manifests/server/host_key.pp index d0ceb7b2..ca3e1057 100644 --- a/manifests/server/host_key.pp +++ b/manifests/server/host_key.pp @@ -45,7 +45,7 @@ Optional[String[1]] $certificate_content = undef, ) { # Ensure the ssh::server class is included in the manifest - include ssh::server + contain ssh::server if $ensure == 'present' { if ! $public_key_source and ! $public_key_content { diff --git a/manifests/server/instances.pp b/manifests/server/instances.pp index 901f5449..049dcd28 100644 --- a/manifests/server/instances.pp +++ b/manifests/server/instances.pp @@ -35,7 +35,7 @@ Stdlib::Absolutepath $sshd_binary = $ssh::server::sshd_binary, Optional[Stdlib::Absolutepath] $sshd_environments_file = $ssh::server::sshd_environments_file, ) { - include ssh::server + contain ssh::server $sshd_instance_config = assert_type(Hash, pick($options['sshd_config'], {})) $sshd_instance_matchblocks = assert_type(Hash, pick($options['match_blocks'], {}))