Scott Beardsley <[email protected]> writes:
> I was slightly surprised to see that there is no "gateway" fact.
Er, this fact is mostly unhelpful: there is no "gateway" — there are
zero-or-more gateways, depending on the route on the server, which may or may
not get used to communicate to any given destination.
A number of our machines have two or more gateways, since they have multiple
paths to other networks, differentiated by route priority and/or manipulated
by a routing protocol.
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 :)
> I poked around and it seems easy enough to add but I'm running into a
> problem... My gateway.rb looks like:
[...]
> elsif distid.match(/Ubuntu|Debian/)
> gateway = %x{/bin/grep -E '^[ ]*gateway' /etc/network/
> interfaces|/bin/sed -e 's/^[ ]*gateway[ ]//'}.chomp
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.
Daniel
--
✣ Daniel Pittman ✉ [email protected] ☎ +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 [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.