On Wednesday, March 11, 2015 at 10:02:08 PM UTC-5, Amos Shapira wrote:
>
> On Thursday, 12 March 2015 00:39:53 UTC+11, jcbollinger wrote:
>>
>>
>>
>> On Tuesday, March 10, 2015 at 10:30:48 PM UTC-5, Amos Shapira wrote:
>>>
>>> Hi,
>>>
>>> I'm running into the common issue of having to force an "apt-get update" 
>>> before installing packages (in my case - because the base EC2 AMI is old 
>>> and I need it to pick newer package versions).
>>>
>>> I ended up doing the usual:
>>>
>>>  exec { 'apt-get update':
>>>    path => '/usr/bin/',
>>>  }
>>>  ->
>>>  Package <| |>
>>>
>>>
>>
>> If you are using PuppetLabs's Apt module, then I think setting the 
>> 'always_apt_update => true' on class 'apt' and declaring
>>
>> Class['Apt'] -> Package <| |>
>>
>>
>> should take care of it for you.  That module's 'apt::update' class is not 
>> really suited to be public, given the way the module uses it.
>>
>>
> Thanks. I'm aware of the "always_apt_update" option but am worried that it 
> means that puppet will force an "apt-get update" every time it runs (every 
> 30 minutes).  We will eventually move away from puppet agents to immutable 
> images but until then I'm worried that this could stir up a lot of load on 
> our EC2 instances which we wouldn't want.
>
>

Well yes, I would expect 'always_apt_update => true' to cause an "apt-get 
update" on every Puppet run.  I didn't comment on that before because you 
get the same thing from the Exec you described using.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6778e9ab-f414-4895-a892-6b73c78074d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to