59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
# File 'manifests/server.pp', line 59
class ssh::server (
String[1] $service_name,
Stdlib::Absolutepath $sshd_config,
Stdlib::Absolutepath $sshd_dir,
Stdlib::Absolutepath $sshd_binary,
Integer $host_priv_key_group,
Hash $default_options,
Enum[present,absent] $ensure = present,
Boolean $storeconfigs_enabled = true,
Hash $options = {},
Boolean $validate_sshd_file = false,
Boolean $use_augeas = false,
Array $options_absent = [],
Hash $match_block = {},
Boolean $use_issue_net = false,
Optional[Stdlib::Absolutepath] $sshd_environments_file = undef,
Optional[String[1]] $server_package_name = undef,
) {
if $use_augeas {
$merged_options = sshserver_options_to_augeas_sshd_config($options, $options_absent, { 'target' => $ssh::server::sshd_config })
} else {
$merged_options = deep_merge($default_options, $options)
}
include ssh::server::install
include ssh::server::config
include 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
Class['ssh::server::install']
-> Class['ssh::server::config']
~> Class['ssh::server::service']
-> Class['ssh::hostkeys']
-> Class['ssh::knownhosts']
} else {
Class['ssh::server::install']
-> Class['ssh::server::config']
~> Class['ssh::server::service']
}
$match_block.each |String $k, Hash $v| {
ssh::server::match_block { $k:
* => $v,
}
}
}
|