When I do a chef-client -o just_one_cookbook it removes all the other cookbooks from the cache because they are “no longer needed on this client”. Then next time a scheduled run occurs all the cookbooks get downloaded again. For various reasons I’d rather this didn’t happen.
I tried putting this in the client.rb file:
cache_options({ :skip_expires => true})
But it does not affect this behavior.
Can anyone point me to a way of preventing this cache cleanup when using an run_list override?
try Chef::Config[:file_cache_path] to something other than the default one.
I have used this trick to orchestrate multi-stage chef runs ,
you can see some example here:
if you want this to be done via command line, you might want to run the
chef-client -o just_one_cookbook -c
When I do a chef-client –o just_one_cookbook it removes all the other
cookbooks from the cache because they are “no longer needed on this
client”. Then next time a scheduled run occurs all the cookbooks get
downloaded again. For various reasons I’d rather this didn’t happen.****
I tried putting this in the client.rb file:****
cache_options({ :skip_expires => true})****
But it does not affect this behavior.****
Can anyone point me to a way of preventing this cache cleanup when using
an run_list override?****