Hi Stephan,

You're resonse got me thinking. I was using this on Amazon EC2:

            @@host { $fqdn:
                     ip           => $ipaddress,
                     host_aliases => ["${hostname_alias}",
"${domain_name}", "${hostname}"],
                     ensure       => present,
                     target       => "/etc/hosts",
                     tag          => 'ssh-gateway',
                   }


I'm using my own variables $hostname_alias and domain_name to get
hostnames that humans can read (instead of the Amazon supplied random
hostnames).

So I should have used:

@@host { $hostname_alias:
                     ip           => $ipaddress,
                     host_aliases => ["${hostname_alias}",
"${domain_name}", "${hostname}"],
                     ensure       => present,
                     target       => "/etc/hosts",
                     tag          => 'ssh-gateway',
                   }

This way it works fine.

Greetings!


On Fri, Jan 28, 2011 at 11:13 PM, Stefan Schulte
<stefan.schu...@taunusstein.net> wrote:
> On Fri, Jan 28, 2011 at 01:03:24PM -0800, bowlby wrote:
>> Sorry for reviving this old post but I'm having trouble with the above
>> setup.
>>
>> Everytime one of my slaves changes it's IP the hostfile on the ssh-
>> gateway gets updated. So for, so good. But the update just adds an
>> entry to the hosts-file, thereby leaving the old entry intact. So I
>> end up with:
>>
>> 10.72.1.21 server1
>> 10.72.1.45 server1
>> 10.72.1.90 server1
>> etc.
>>
>> Is there an easy solution to this?
>>
>> Thanks!
>
> Since the fqdn is the key this should NOT happen. Puppet should detect
> the change of the ip. Can you please post the complete resource
> definition?
>
> -Stefan
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>
>

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

Reply via email to