On 02/19/2011 10:23 AM, Patrick wrote:
> 
> 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.

If the provider in question fails to flatten the array properly, you're
in trouble (this is true for the groups parameter of the user provider,
for 0.25.5 at least).

This is interesting and helpful:
http://weblog.etherized.com/posts/175

Cheers,
Felix

-- 
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