- From: Michael Hale <
>
- To: chef <
>
- Subject: [chef] Re: Re: Re: Re: apt-get update strategy
- Date: Mon, 28 Mar 2011 12:11:39 -0400
Maybe you could add something like this to your provider:
update_success_stamp_mtime =
File.mtime("/var/lib/apt/periodic/update-success-stamp")
Dir["/etc/apt/**/*.list"].any?{|list_file| File.mtime(list_file) >
update_success_stamp_mtime }
On Mon, Mar 28, 2011 at 9:28 AM, mikehale
<
>
wrote:
>
Luke,
>
>
I'm thinking you would want someway to apt-get update again if you add or
>
remove a repository regardless of whether or not you have already updated
>
in a given chef run.
>
>
On Mon, Mar 28, 2011 at 8:43 AM, Luke Biddell
>
<
>
>
wrote:
>
> Perfect, just what I was looking for. Thanks.
>
>
>
> On 28 March 2011 12:17, Mason Turner
>
> <
>
>
> wrote:
>
>> On Mar 28, 2011, at 5:54 AM, Luke Biddell
>
>> <
>
>
>> wrote:
>
>>
>
>> The flag to indicate if an update has been done is stored on the node
>
>> and has to be reset at the start of each run. Is there a better way of
>
>> setting transient attributes for the run?
>
>>
>
>> Take a look at node.run_state for transient storage. I stow my searches
>
>> there for reuse across a few recipes.
>
>>
>
>> -- Mason Turner (mobile)
>
>
>
>
Archive powered by MHonArc 2.6.16.