Skip to content

Commit

Permalink
use contain instead of include, fixes #367 (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
saz authored May 24, 2024
1 parent c2175e4 commit b9a6675
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion manifests/client/config/user.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion manifests/server/config/setting.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? {
Expand Down
2 changes: 1 addition & 1 deletion manifests/server/host_key.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion manifests/server/instances.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'], {}))
Expand Down

0 comments on commit b9a6675

Please sign in to comment.