[chef] Re: Cleaning up Cron (or other resources)

Chronological Thread 
  • From: Akzhan Abdulin < >
  • To:
  • Subject: [chef] Re: Cleaning up Cron (or other resources)
  • Date: Tue, 22 May 2012 00:20:11 +0400

Set note attributes to save which crons were added.

2012/5/21 Seth Vargo < " target="_blank"> >

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}"

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.


Archive powered by MHonArc 2.6.16.