On 10/14/2012 03:01 PM, Stefan Schulte wrote:
If you use "ensurable", puppet will expect the provider to have an
exists? method and if that returns true your create method will not be
called so you do not have to check the existance in the create method
again.
But then I would have to change all params to properties and add
appropriate methods to provider, but that would both slow it down and
complicate it more... I don't know if it's worth it just for the sake of
log message stating "property changed from A to B" instead of
"cobblersystem created" on every param change.
If adding interfaces to a new host is exactly the same as changing
interfaces of an already existing host you can call
interface = resource[:interface] if resoure[:interface]
I'll try that.
Is your provider dealing with files or does it execute commands? When
dealing with files I find it is often easier to do all the work in the
flush method (which is only called if it is implemented by the provider)
and the other set methods are only updating the @property_hash hash.
So if you want to share your provider code I am always interested ;-)
Offcourse, I have nothing to hide. Here's the current code:
http://pastebin.com/f7GFU2qp
--
Jakov Sosic
www.srce.unizg.hr
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" 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-users?hl=en.