On Feb 18, 2011, at 11:52 PM, Tim Connors wrote:
> If I expand that out so it reads
> 
>  host { "puppet":
>    ensure => absent,
>  }
>  host { "puppet.aao.gov.au":
>    ensure => present,
>    ip     => "192.231.166.36",
>    host_aliases  => ["puppet", "aatlxha.aao.gov.au", "aatlxha"],
>  }
> 
> then the hosts file only gets updated the once.  But if I use the
> hostentry definition, then it gets every run.

My understanding is that it would be expanded to this:

 host { "puppet":
   ensure => absent,
 }
 host { "puppet.aao.gov.au":
   ensure => present,
   ip     => "192.231.166.36",
   host_aliases  => ["puppet", ["aatlxha.aao.gov.au", "aatlxha"] ],
 }

Try putting that in a test manifest and see what happens.  If that doesn't 
compile, try this instead
$hostaliases = ["aatlxha.aao.gov.au", "aatlxha"] 
 host { "puppet":
   ensure => absent,
 }
 host { "puppet.aao.gov.au":
   ensure => present,
   ip     => "192.231.166.36",
   host_aliases  => ["puppet", $hostaliases ],
 }


If so, you probably need to change the syntax in your define.  I'm hoping 
there's a syntax that tells puppet to join 2 arrays.

> A clue perhaps is those hosts without a hostaliases:
> 
> notice:
> /Stage[main]/Hosts/Hosts::Hostentry[aatlxc]/Host[aatlxc.aao.gov.au]/host_aliases:
> host_aliases changed 'aatlxc' to 'aatlxc '

Sounds like a minor bug to me.  I'd try to see if putting a space at the end of 
an alias is allowed, but reproduces this.  If so, I'd file a bug so it at least 
gives a warning.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to