On May 4, 2010, at 2:47 PM, Grzegorz Marszałek wrote:
Hello!
I'm using puppet for a while - it's really great :) What is missing
it's windows support - but I was able to deal with that with few
ruby scripts, which in turn generate puppet classes, which in turn
generate proper wpkg files, which are then used by windows wpkg from
wpkg.org...
It's quite complicated, and I think I can simplify it A LOT if I'd
be able to "inject" exported resources to puppet database - this way
I can ie.: install nagios client (nsclient++) on windows using pure
wpkg configuration, and then export proper resource so my nagios
server can notice it and start monitoring it properly.
And that is my question - I now ruby, but puppet code overhelms
me... Could you please point me, where should I look for proper
method classes to "injest" resources into database? I need to save
in db new node, and then - few file resources. I'm not quite sure if
I should use full puppet types classes, or stay quite "low level"
and use just activerecord models to "emulate" such a resources?
This is actually really easy. It's all Rails in this situation, so
just create Rails Resource instances and save them. This is off the
cuff, but it's something like:
resource = Puppet::Rails::Resource.new(:type => "mytype", :title =>
"mytitle", :exported => true, ...
resource.save
Please let me know if this doesn't work or isn't solveable.
--
The salesman asked me what size I wore, I told him extra-medium.
-- Stephen Wright
---------------------------------------------------------------------
Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" 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-dev?hl=en.