On Friday, December 20, 2013 9:58:33 AM UTC-6, Jon Yeargers wrote:
>
> I'm using the puppetforge 'apt' module to deal with some repositories. It 
> has 'always-apt-update' as a property and I've had it set to 'true' but I'm 
> wondering what happens if I don't. 
>
>

There are at least 8 'apt' modules by different authors available from the 
Forge.  By far the most commonly used one is puppetlabs's own, and its 
'apt' class does have a parameter such as you describe, so I will guess 
that that's the one you are using.

 

> Is the puppet package manager 'smart' enough to get the latest versions of 
> packages that it's monitoring ('ensure => latest') without being told to 
> keep the repository up to date?
>
> The main reason I'm asking is that the 'apt-get update' seems to always 
> run last in the 'agent' pass. IE it takes two runs to get the latest 
> packages - 1 to update the cache and the 2nd to get the latest versions. 
>


Puppet does not enforce any particular relative order of resource 
synchronization except to the extent you instruct it to do so.  Now you 
just need to instruct Puppet to manage Apt itself before it manages any 
packages that rely on Apt.  Stefan has a good suggestion there, but it 
suffers from a minor problem: in referring to resource Exec['apt_update'] 
it depends on implementation details of a particular 'apt' module.  It 
should be sufficient, at least for the puppetlabs-apt module, to instead say

    Class['apt'] -> Package<| |>

That may appear at the top level of site.pp if you are managing only 
machines that rely on Apt; otherwise it should go into one or more classes 
or node blocks so that all apt-based machines get that declaration 
somewhere in their configurations.


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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/70814371-ff92-40bc-b162-2ca3cabeb8d5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to