When you look into puppet source type.rb, ensurable accept a block. If
you pass a block like this
ensurable do
[...]
end
it is exactly the same as if you'd written
newproperty(:ensure, :parent => Puppet::Property::Ensure) do
[...]
end
If you do not pass a block puppet will fill
On Fri, Jan 21, 2011 at 11:13 AM, Dick Davies
wrote:
> Thanks for point 2, much appreciated. Is the 'global' validate
> option documented anywhere?
>
ummm.. maybe.
> on point 1, using the 'ensurable' magic means I don't have anywhere
> to stick the defaultto keyword (I tried
>
> ensurable do
>
Thanks for point 2, much appreciated. Is the 'global' validate
option documented anywhere?
on point 1, using the 'ensurable' magic means I don't have anywhere
to stick the defaultto keyword (I tried
ensurable do
defaultto 'present'
end
but didn't seem to do the trick (blows up with a
"change
On Fri, Jan 21, 2011 at 8:31 AM, Dick Davies wrote:
> I've almost finished a pretty simple type/provider to manage
> RabbitMQ users and virtual hosts.
> I'm using the 'ensurable' keyword in my type to save a bit of boilerplate.
>
> Type is below (the provider is just a wrapper around the 'rabbitmq
I've almost finished a pretty simple type/provider to manage
RabbitMQ users and virtual hosts.
I'm using the 'ensurable' keyword in my type to save a bit of boilerplate.
Type is below (the provider is just a wrapper around the 'rabbitmqctl'
command.
Have a feeling there's a developer guide somewh