Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # cat modules/lemon/lib/puppet/provider/metric/lemon.rb
- Puppet::Type.type(:metric).provide(:lemon) do
- desc "Manages a lemon metric configuration"
- metricfile = "/etc/lemon/agent/metrics/#{resource[:id]}.conf"
- def create
- File.open(metricfile,'w') do |f|
- f.puts("\n")
- end
- end
- def destroy
- File.delete(metricfile)
- end
- def exists?
- File.exists? metricfile
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment