forked from redhat-openstack/openstack-puppet-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow turning off storeconfigs/hostkey managment
- Loading branch information
Showing
2 changed files
with
25 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,36 @@ | ||
class ssh::server( | ||
$ensure = present, | ||
$storeconfigs_enabled = true, | ||
$options = {} | ||
) inherits ssh::params { | ||
$merged_options = merge($ssh::params::sshd_default_options, $options) | ||
|
||
include ssh::server::install | ||
include ssh::server::config | ||
include ssh::server::service | ||
include ssh::hostkeys | ||
include ssh::knownhosts | ||
|
||
anchor { 'ssh::server::start': } | ||
anchor { 'ssh::server::end': } | ||
|
||
Anchor['ssh::server::start'] -> | ||
Class['ssh::server::install'] -> | ||
Class['ssh::server::config'] ~> | ||
Class['ssh::server::service'] -> | ||
Class['ssh::hostkeys'] -> | ||
Class['ssh::knownhosts'] -> | ||
Anchor['ssh::server::end'] | ||
# Provide option to *not* use storeconfigs/puppetdb, which means not managing | ||
# hostkeys and knownhosts | ||
if ($storeconfigs_enabled) { | ||
include ssh::hostkeys | ||
include ssh::knownhosts | ||
|
||
Anchor['ssh::server::start'] -> | ||
Class['ssh::server::install'] -> | ||
Class['ssh::server::config'] ~> | ||
Class['ssh::server::service'] -> | ||
Class['ssh::hostkeys'] -> | ||
Class['ssh::knownhosts'] -> | ||
Anchor['ssh::server::end'] | ||
} | ||
else { | ||
Anchor['ssh::server::start'] -> | ||
Class['ssh::server::install'] -> | ||
Class['ssh::server::config'] ~> | ||
Class['ssh::server::service'] -> | ||
Anchor['ssh::server::end'] | ||
} | ||
} |