Changed ssh::known_hosts to use use exported resources
This commit is contained in:
parent
b70e9c2674
commit
8562ddec5b
2 changed files with 15 additions and 79 deletions
|
@ -1,25 +1,27 @@
|
|||
|
||||
# Class: ssh::known_hosts
|
||||
#
|
||||
# Install global ssh_known_hosts file generated from LDAP directory.
|
||||
#
|
||||
# === Depencies:
|
||||
#
|
||||
# Template file generation requires Ruby LDAP bindings[http://ruby-ldap.sourceforge.net/] on puppet server.
|
||||
# Export and collect public host keys.
|
||||
#
|
||||
class ssh::known_hosts {
|
||||
|
||||
file { "/etc/ssh/ssh_known_hosts":
|
||||
ensure => present,
|
||||
content => template("ssh/ssh_known_hosts.erb"),
|
||||
mode => 0644,
|
||||
owner => root,
|
||||
group => $operatingsystem ? {
|
||||
ensure => present,
|
||||
mode => 0644,
|
||||
owner => root,
|
||||
group => $operatingsystem ? {
|
||||
OpenBSD => wheel,
|
||||
default => root,
|
||||
},
|
||||
}
|
||||
|
||||
@@sshkey { "${homename}":
|
||||
ensure => present,
|
||||
type => rsa,
|
||||
key => "${sshrsakey}",
|
||||
host_aliases => inline_template("<%= homename.split('.')[0] %>"),
|
||||
require => File["/etc/ssh/ssh_known_hosts"],
|
||||
}
|
||||
|
||||
Sshkey <<| |>>
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue