[Puppet Users] Re: Facter and loops.

2009-01-03 Thread Robin Lee Powell
On Sat, Jan 03, 2009 at 10:52:19PM -0800, Jos Backus wrote: > Btw, rather than parsing /etc/passwd yourself, why not let the Etc > module do the work for you? > > Etc.passwd do |pwent| >Facter.add("home_#{pwent.name}") do >setcode do > pwent.dir >end >

[Puppet Users] Re: Facter and loops.

2009-01-03 Thread Jos Backus
On Sat, Jan 03, 2009 at 05:13:01PM -0800, Robin Lee Powell wrote: > What I end up with is: > >passwd = IO.readlines('/etc/passwd') >passwd.each do |line| >line =~ /(.*):(.*):(.*):(.*):(.*):(.*):(.*)/ >Facter.add("home_#{$1.dup}") do The dup isn't actually

[Puppet Users] Re: Facter and loops.

2009-01-03 Thread Robin Lee Powell
On Sat, Jan 03, 2009 at 05:12:24PM -0800, Jos Backus wrote: > Untested: > > On Sat, Jan 03, 2009 at 04:55:41PM -0800, Robin Lee Powell wrote: > > > > > > I'm trying to create a bunch of Facter facts in a loop. The code > > inside is evaluated at some weird time, *out of order*, and I don't > >

[Puppet Users] Facter and loops.

2009-01-03 Thread Robin Lee Powell
I'm trying to create a bunch of Facter facts in a loop. The code inside is evaluated at some weird time, *out of order*, and I don't know enough Ruby to fix it. The goal is to get access to user homedirs, because I can't figure out any other way to do that in Puppet. Here's a few tries:

[Puppet Users] Re: problem with custom funcion

2009-01-03 Thread Grzegorz Marszałek
Ok, sorry for trouble - I misspelled filename. Now it works perfectly :) Wiadomość napisana w dniu 2009-01-03, o godz. 00:44, przez Grzegorz Marszałek: > > Oh, and I'm using puppet 0.24.6. > > Wiadomość napisana w dniu 2009-01-03, o godz. 00:34, przez Grzegorz > Marszałek: > >> >> Hello! >>

[Puppet Users] Re: err: Could not run Puppet::Client::MasterClient: undefined method

2009-01-03 Thread Kristoffer Egefelt
Thanks guys - it works :D On Mon, Nov 17, 2008 at 4:52 PM, Nigel Kersten wrote: > > On Mon, Nov 17, 2008 at 7:51 AM, Nigel Kersten wrote: > > On Mon, Nov 17, 2008 at 2:06 AM, Brice Figureau > > wrote: > >> > >> On Mon, 2008-11-17 at 01:01 -0800, Kristoffer wrote: > >>> Hi, > >>> > >>> On debia