Ruby Class or other API for controlling puppet/mcollective

48 views
Skip to first unread message

bjoern pohl

unread,
Jun 19, 2013, 4:47:20 AM6/19/13
to puppet...@googlegroups.com
HI,
i'm currently trying to develop a task-driven rails-based frontend for some tasks that puppet/mcollective is doing in the background ( basically some user-management and some asset queries...).

But i'm currently stuck at finding some puppet/mcollective API classes for ruby. (you'll only find results for using ruby within puppet, which is of course more obvious).
Is there anything besides the depreciated DSL API and the http REST interface?


thanks &  best regards,
Björn


Matthew Black

unread,
Jun 20, 2013, 1:44:54 AM6/20/13
to puppet...@googlegroups.com
Not knowing your entire goal but what you could use is the mcollective-client gem in your rails application and have the puppet mcollective agent, which PuppetLabs made, and you can run puppet related commands like you would with "puppet resource".

So right now you can do something like "puppet resource user root" and it will return back the definition how it would look in puppet. You can also make changes, using the previous example, by adding on in the command the property fields in key=value format (e.g. puppet resource user root password='<password>')







--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages