On Apr 19, 10:09 pm, Daniel Pittman <dan...@rimspace.net> wrote:
> So, a simple "gateway" fact is essentially meaningless for our network; this
> is probably true of at-least-some machines on at-least-some large networks.
>
> (So, while your fact is meaningful, it isn't a generic "gateway" fact :)
<snip>
> This can return multiple results, trivially, even on a simple network where
> you have multiple definitions in /etc/network/interfaces; it breaks in the
> face of network mapping, or of having two NICs with gateway statements.

When I made up my sites broadcast fact I solved it in a manner like
interfaces.rb. Essentially there are multiple "broadcast_$interface"
facts, and while creating these the interface associated with
"ipaddress" also sets the "broadcast" fact as primary.

Moving on to the gateway fact; I think a trivial solution is to use
your array of gateways to create a series of "gateway_$n"[1] facts. If
you can detect a default then that can be "gateway". Given I haven't
looked at this exact problem yet, so I could be overlooking the hard
bits.

[1] I could have *sworn* Facter::Util had a method for exactly this,
but now I don't see it of course.

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