apt-pinning & puppet package management

814 views
Skip to first unread message

CoolCold

unread,
May 16, 2011, 4:49:22 PM5/16/11
to puppet...@googlegroups.com
Hello!
I have question about Debian package management with puppet. I'm
wondering is there sane way to make puppet respects packages pinning?
i.e., if I have several repos for one package, let's say it is "nginx"
which can be found in lenny & lenny-backports repos. I've created
pinning file like:
Package: nginx
Pin: release a=lenny-backports
Pin-Priority: 600

So, if i have nginx installed from repository "lenny" , 'apt-get
install nginx' will update (if version is newer of course) nginx from
lenny-backports .
When I run puppet, it just ignores package available in pins, I guess
it thinks package already installed. Package is described like:
$packagelist = [ "nginx" ]

package { $packagelist:
ensure => installed,
}

Using "latest" is not the cure, because it will look only on version
(as i understand) and not on pins. I've found
https://github.com/evolvingweb/puppet-apt/blob/master/manifests/force.pp
which looks like something I need, but may be I'm missing something
and there is proper way to do this.

My puppet versions:
root@kappa2:~# dpkg -l|grep puppet
ii puppet 2.6.2-4~bpo50+1
Centralized configuration management - agent
ii puppet-common 2.6.2-4~bpo50+1
Centralized configuration management
root@kappa2:~# puppetd --version
2.6.2

OS - Debian Lenny amd64, puppet from backports.

P.S. Please, CC me on reply.

--
Best regards,
[COOLCOLD-RIPN]

Patrick Mohr

unread,
May 17, 2011, 3:39:52 AM5/17/11
to puppet...@googlegroups.com, coolt...@gmail.com
If it's pinned like you show, will your computer upgrade to the backports version if you run "apt-get update && apt-get upgrade" or do you need the "-t"? 


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


CoolCold

unread,
May 17, 2011, 3:44:42 AM5/17/11
to Patrick Mohr, puppet...@googlegroups.com
On Tue, May 17, 2011 at 11:39 AM, Patrick Mohr <kc7...@gmail.com> wrote:
> If it's pinned like you show, will your computer upgrade to the backports
> version if you run "apt-get update && apt-get upgrade" or do you need the
> "-t"?
Well, it should upgrade to backport version, because of just
apt-get update && apt-get install nginx
installs the version from backports.

--
Best regards,
[COOLCOLD-RIPN]

Felix Frank

unread,
May 20, 2011, 11:42:11 AM5/20/11
to puppet...@googlegroups.com
On 05/16/2011 10:49 PM, CoolCold wrote:
> Using "latest" is not the cure, because it will look only on version
> (as i understand) and not on pins.

Have you tried this?

If apt-cache policy lists a newer candidate for a package, it's my
understanding that ensure => latest with the apt provider should fetch
that for you.

Cheers,
Felix

Nigel Kersten

unread,
May 20, 2011, 11:45:03 AM5/20/11
to puppet...@googlegroups.com
Yeah, it's always been my experience that ensure => latest will honor your pins.


 

Cheers,
Felix

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




--
Nigel Kersten
Product, Puppet Labs
@nigelkersten

Reply all
Reply to author
Forward
0 new messages