On 09/12/10 19:19, Patrick wrote:
> 
> On Dec 9, 2010, at 10:07 AM, Brice Figureau wrote:
> 
>> On 09/12/10 03:38, Daniel Pittman wrote:
>>> Sadly, no. I very much missed the feature. We ended up using the apt
>>> preferences file to implement that behaviour
>>>
>>> If I was doing it over I would use a define that added the package
>>> resource and also used concat to automatically build up the preferences
>>> entry.
>>
>> I have a define called apt::source that at the same time adds a source
>> to sources.list.d and creates a fragment of apt preferences (with a
>> carefully set pin priority), which when all concatenated form the
>> central apt preferences file.
>>
>> This works flawlessly :)
> 
> I would love to get my hands on that.  Any chance you could post it? 

Here it is:
https://gist.github.com/21ec1c202b7614a23086

It is not the complete apt class I'm using but should be a good start
for you. It's some old code I wrote 2 years ago, so the code style is
not perfect :)

It uses two definitions coming from David Schmidtt, concatenate_file
which handles the fragment pattern and config_file which is just a file
with the correct perms/backup...

Oh and bonus, this also handles custom apt keys.

Hope that helps,
-- 
Brice Figureau
My Blog: http://www.masterzen.fr/

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to