DWIM <ralph.gro...@itdz-berlin.de> writes:
> On May 22, 8:42 pm, Benoit Cattié <pup...@benoit.cattie.net> wrote:
>>
>> You can get the ipadress with facter (and use it in your puppet classes,
>> templates ...)
>
> That was what I also had in mind first when I needed to specify a
> host's IP address as bind address in some xinetd spawned server's
> config file.
>
> However, how do you pick the proper IP address if you have to deal
> with multihomed hosts like I have with most of our hosts?

Hah!  You don't, because those facts were written to match the vague
relationship that distributions express (one IP per "device") rather than the
reality of the relationships.

[...]

> $ /sbin/ip a s eth2|grep inet\
>     inet 10.25.139.12/24 brd 10.25.139.255 scope global eth2
>     inet 10.25.139.15/24 brd 10.25.139.255 scope global secondary eth2:1

NB: That tagging of that second address as 'eth2:1' is not necessary, and many
of our servers have secondary addresses without any of the alias mess
attached.  Just sayin'

[...]

> But probably there are better solutions, especially those that Puppet or
> Ruby experts would apply, and which as a Puppet newbie I am likewise eager
> to hear about.

I would strongly suggest you are going about this the wrong way: if you have a
multi-homed host, and you need to bind the service to a specific IP address,
you have a *good* reason for doing that.

So, specify to your service which address it should be bound to, rather than
trying to do something magical about it all.  Tell the system which IP you
need the service to be listening on.


Otherwise, if you don't actually have a good reason, or know which IP it
should be bound to, why are you trying to bind it to an IP anyhow?

        Daniel
-- 
✣ Daniel Pittman            ✉ dan...@rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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