[chef] Re: Listing files in cookbook/files/default/

Chronological Thread 
  • From: Denis Barishev < >
  • To:
  • Cc: "Jason J. W. Williams" < >
  • Subject: [chef] Re: Listing files in cookbook/files/default/
  • Date: Sun, 25 Sep 2011 12:07:28 +0400


On 09/25/2011 03:06 AM, Jason J. W. Williams wrote:
Is there a better way to dynamically list the contents of the
<cookbook>/files/default/ directory from a recipe at runtime than
inspecting that path in /var/chef/cache/cookbooks ?

My concern is that the Chef sometimes removes files from the cache
that are in the cookbook but it doesn't consider currently needed.
Thank you in advance.

I can't say anything about a better way than listing. But I can't agree that it doesn't cconsider if file is needed. Unless you remove a file resource that uses /files/default/* the file will persist in the node cache.
Maybe you could think of defining a file resource with action :nothing that obviously can help to solve the problem.



Archive powered by MHonArc 2.6.16.