How to call a definition from a ruby_block?


#1

I am trying to write a recipe that installs munin-node[1], and
subsequently syncs the plugins (files) and plugin-conf.d
directories based on an attribute value.

package ‘munin-node’ do
action [:enable, :start]
notifies 'sync plugins’
end

ruby_block ‘sync plugins’ do
block do
# how do a call the munin_plugin here?
end
end

definitions/munin_plugin.rb:

define :munin_plugin do

end

It seems quite complicated so if I missed an easier route to
running post-install ruby code that makes use use of Chef
resources.

[1] Yes, I am aware of the existing munin plugin. It does not
have this feature, and requires a chef server while I am using
chef-solo.

/Allan

Allan Wind
Life Integrity, LLC
http://lifeintegrity.com