Added support for deploying ssh server host keys.
This commit is contained in:
parent
d6c90291e8
commit
702e8924ce
1 changed files with 70 additions and 0 deletions
|
@ -23,6 +23,76 @@ class ssh::known_hosts {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Install SSH host keys.
|
||||||
|
#
|
||||||
|
class ssh::hostkeys {
|
||||||
|
|
||||||
|
file { "/etc/ssh/ssh_host_dsa_key":
|
||||||
|
ensure => present,
|
||||||
|
source => "puppet:///private/ssh_host_dsa_key",
|
||||||
|
mode => 0600,
|
||||||
|
owner => root,
|
||||||
|
group => $operatingsystem ? {
|
||||||
|
openbsd => wheel,
|
||||||
|
default => root,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
file { "/etc/ssh/ssh_host_dsa_key.pub":
|
||||||
|
ensure => present,
|
||||||
|
source => "puppet:///private/ssh_host_dsa_key.pub",
|
||||||
|
mode => 0644,
|
||||||
|
owner => root,
|
||||||
|
group => $operatingsystem ? {
|
||||||
|
openbsd => wheel,
|
||||||
|
default => root,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "/etc/ssh/ssh_host_rsa_key":
|
||||||
|
ensure => present,
|
||||||
|
source => "puppet:///private/ssh_host_rsa_key",
|
||||||
|
mode => 0600,
|
||||||
|
owner => root,
|
||||||
|
group => $operatingsystem ? {
|
||||||
|
openbsd => wheel,
|
||||||
|
default => root,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
file { "/etc/ssh/ssh_host_rsa_key.pub":
|
||||||
|
ensure => present,
|
||||||
|
source => "puppet:///private/ssh_host_rsa_key.pub",
|
||||||
|
mode => 0644,
|
||||||
|
owner => root,
|
||||||
|
group => $operatingsystem ? {
|
||||||
|
openbsd => wheel,
|
||||||
|
default => root,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "/etc/ssh/ssh_host_key":
|
||||||
|
ensure => present,
|
||||||
|
source => "puppet:///private/ssh_host_key",
|
||||||
|
mode => 0600,
|
||||||
|
owner => root,
|
||||||
|
group => $operatingsystem ? {
|
||||||
|
openbsd => wheel,
|
||||||
|
default => root,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
file { "/etc/ssh/ssh_host_key.pub":
|
||||||
|
ensure => present,
|
||||||
|
source => "puppet:///private/ssh_host_key.pub",
|
||||||
|
mode => 0644,
|
||||||
|
owner => root,
|
||||||
|
group => $operatingsystem ? {
|
||||||
|
openbsd => wheel,
|
||||||
|
default => root,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Disable SSH server.
|
# Disable SSH server.
|
||||||
#
|
#
|
||||||
class ssh::disable {
|
class ssh::disable {
|
||||||
|
|
Loading…
Add table
Reference in a new issue