[Puppet Users] Re: dealing with numbered items in Augeas

2009-05-18 Thread Brent Chapman
ts/ncg). It's not the right approach for all circumstances, though, and Augeas might be useful in those cases. -Brent -- Brent Chapman Founder and CEO // Netomata, Inc. // www.netomata.com Making networks more reliable and flexible by automating network configuration --~--~-~--

[Puppet Users] Re: dealing with numbered items in Augeas

2009-05-18 Thread Brent Chapman
On Mon, May 18, 2009 at 9:01 AM, Rob McBroom wrote: > > On 2009-May-16, at 12:42 PM, Brent Chapman wrote: > > > If your goal is to append something to an Augeas list, then I think > > it's much better to use the [last()+1] notation. > > There are a couple of probl

[Puppet Users] Re: dealing with numbered items in Augeas

2009-05-16 Thread Brent Chapman
expression search methods to find the relevant line, rather than assuming that the line number will never change. Treat the numeric indexes produced by Augeas as if they were pointers in C. You never want to hardcode the value of a pointer into your code, because the value might be different th

[Puppet Users] Re: Useful Puppet/Facter CDP/cdpr hack

2009-04-22 Thread Brent Chapman
> end > > end > > > > Facter.add("cdp_port") do > > setcode do > > port > > end > > end > > -- > > > > So after I add this fact to fact sync with puppet I can just walk my > >