The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #14560

package/apt provider needs to allow holding and ensuring a particular version at the same time

Added by Russell Jackson almost 4 years ago. Updated about 2 years ago.

Status:Needs More InformationStart date:05/17/2012
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Affected Puppet version:2.7.14 Branch:
Keywords:debian apt dpkg package hold held

We've Moved!

Ticket tracking is now hosted in JIRA:

This ticket is now tracked at:


The package provider needs to be able to ensure a particular version of a package while also being able to set a hold status simultaneously. Currently, I’m forced to use an exec to install the package and then have the package provider ensure it being held. I can do it the other way around, but then I get change notices about the package version changing from ‘held’ to the ensured version on every run.


#1 Updated by Russell Jackson almost 4 years ago

  • Keywords changed from debian apt package hold held to debian apt dpkg package hold held

#2 Updated by Kelsey Hightower almost 4 years ago

  • Status changed from Unreviewed to Needs More Information


Can you post an example manifest with the exec and package resources? I’m starting to notice a pattern that every package type needs a way to allow special options for the various use cases out there.

#3 Updated by Russell Jackson almost 4 years ago

For example, I need to stay on mcollective 1.2 under squeeze. I could just ensure 1.2, but then some idiot (me) will go and do an apt-get upgrade and screw everything up. Holding the package seems like it would be the obvious solution, but I can’t do both at the same time with the package resource; hence, the following atrocity:

exec { "install-mcollective":
  command => "/usr/bin/apt-get -qq install mcollective=1.2.1-1",
  unless  => "/usr/bin/dpkg --get-selections mcollective | /bin/grep -qE 'install|hold'",
package { "mcollective":
  ensure  => held,
  require => Exec['install-mcollective'],

#4 Updated by Russell Jackson almost 4 years ago

This serverfault thread shows the problem and workarounds (and their problems) concisely.

#5 Updated by Jens Bräuer about 3 years ago

I’d really love to see this fixed. 2 more use-cases, why it would be good to fix this

a) As this is a issue with the Package Type, it also impacts MCollective, which re-uses Puppet RAL (eg. package agent) b) One more example why someone needs a specific version: Logstash. It requires ElasticSearch 0.20.2, but latest stable is 0.20.5 as of writing.

#7 Updated by Adrien Thebo about 2 years ago

Redmine Issue #14560 has been migrated to JIRA:

Also available in: Atom PDF