From 3d26fe78149a75adf677c391fddd3f597c0f3926 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Wed, 23 Jan 2013 17:12:21 +0200 Subject: [PATCH] Use merge() for host_aliases in ssh::known_hosts --- ssh/manifests/init.pp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ssh/manifests/init.pp b/ssh/manifests/init.pp index 166fdef..a8947b9 100644 --- a/ssh/manifests/init.pp +++ b/ssh/manifests/init.pp @@ -12,13 +12,10 @@ class ssh::known_hosts { }, } - $shortname = inline_template("<%= homename.split('.')[0] %>") - - if $::ec2_public_ipv4 { - $aliases = [ $shortname, $::ipaddress, $::ec2_public_ipv4 ] - } else { - $aliases = [ $shortname, $::ipaddress ] - } + $aliases = merge(inline_template("<%= homename.split('.')[0] %>"), + $::ipaddress, + $::ipaddress6, + $::ec2_public_ipv4) @@sshkey { $homename: ensure => present,