Hi,

As often with puppet, I'm trying to do something I think is "simple",
yet I'm hitting a brick wall.

What I want to do is have a client send back a list of members of a
system group so that the server can create some template-based
configuration files for a specific daemon, one per member.

My problem here is that facter doesn't seem to be able to return
anything other than strings. Is that the case? Because it would be
really easier for me to have it return an array of the members :

This is what I've added :

Facter.add(:techgroupmembers) do
    setcode do
        developers = Facter::Util::Resolution.exec('getent group tech')
        # Return only the member list
        developers[/^tech:\*:[0-9]+:(.+)$/, 1]
    end
end

This returns : "user1,user2,user3"

I tried to add ".split(',')", but then I get "user1user2user3". I've
searched quite a lot the reductivelabs websites, this group, and no one
seems to have already complained about this. Am I just taking the wrong
approach here?

Then, my next problem is that once I get the comma separated string on
the server, I don't see how to convert that into an array I could
easily use inside classes and definitions.

...Help? :-)

Matthias

-- 
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Fedora release 10 (Cambridge) - Linux kernel
2.6.27.25-170.2.72.fc10.x86_64 Load : 0.29 1.37 4.47

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@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