Just so you know, I couldn't get the code to work as presented.

I had to change the line:

svc = Puppet::Type.type(:service).new(:name => service, :hasstatus =>
hasstatus).provider

to:

svc = Puppet::Type.type(:service).create(:name => service, :hasstatus
=> hasstatus).provider

Then, it worked like a champ.

Thanks,

Trevor


On Wed, Nov 4, 2009 at 07:41, R.I.Pienaar <r...@devco.net> wrote:
>
> hello,
>
> ----- "Trevor Vaughan" <peiriann...@gmail.com> wrote:
>
>> On this same note, how would I go about using the Puppet service
>> provider in ruby code to turn off unwanted services?  I just hand
>> jammed it for now, but it would be nice to use the abstraction that
>> is so nicely provided.
>
> see http://www.devco.net/archives/2009/10/19/reusing_puppet_providers.php
>
> --
> R.I.Pienaar
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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