[chef] Cleaning up Cron (or other resources)


Chronological Thread 
  • From: Seth Vargo < >
  • To:
  • Subject: [chef] Cleaning up Cron (or other resources)
  • Date: Mon, 21 May 2012 15:53:00 -0400

Hello,

I'm currently writing a script that creates various crontabs based on an attribute like so:

paths.each do |path|
  cron "my-cookbook-#{path}" do
    command "/usr/sbin/task #{path}"
  end
end

This works fine. However, if I remove something from that path, it isn't actually removed in the crontab, since Chef has no way of knowing that I "removed" it from my array. How are people handling this? I could manually delete the cron, but that seems backwards.

Seth



Archive powered by MHonArc 2.6.16.

§