Added ec2_public_ipv4 to host_aliases in ssh::known_hosts
This commit is contained in:
parent
b94a2e8d11
commit
02a834f9da
1 changed files with 9 additions and 4 deletions
|
@ -12,14 +12,19 @@ class ssh::known_hosts {
|
|||
},
|
||||
}
|
||||
|
||||
$shortname = inline_template("<%= homename.split('.')[0] %>")
|
||||
|
||||
if $::ec2_public_ipv4 {
|
||||
$aliases = [ $shortname, $::ipaddress, $::ec2_public_ipv4 ]
|
||||
} else {
|
||||
$aliases = [ $shortname, $::ipaddress ]
|
||||
}
|
||||
|
||||
@@sshkey { $homename:
|
||||
ensure => present,
|
||||
type => rsa,
|
||||
key => $sshrsakey,
|
||||
host_aliases => [
|
||||
inline_template("<%= homename.split('.')[0] %>"),
|
||||
$::ipaddress,
|
||||
],
|
||||
host_aliases => $aliases,
|
||||
require => File["/etc/ssh/ssh_known_hosts"],
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue