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