Forge Home


Package Pinning for RHEL and Debian based Distributions


595 latest version

5.0 quality score

Version information

  • 0.3.1 (latest)
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.0
released Aug 4th 2021
This version is compatible with:
  • Puppet Enterprise 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 8.0.0
  • , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'maxadamo-pin_package', '0.3.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add maxadamo-pin_package
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install maxadamo-pin_package --version 0.3.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



maxadamo/pin_package — version 0.3.1 Aug 4th 2021


Table of Contents

  1. Description
  2. Notes on this version
  3. Usage
  4. Limitations
  5. Development


This module installs packages and forces version pinning on Debian and RedHat based distribution (Debian, Ubuntu, RedHat, CentOS...).

Pinned packages cannot be upgraded, unless they're unpinned or their version number is changed.

Notes on this version

This is a transitioning version and you can still use pin_package or pin_package::pin. The latter will be removed in the coming version.



pin_package { 'apache':
  ensure => '0.5-40';


pin_package { 'apache':
  ensure => '0.5-40',
  unpin  => true;

Mutual dependencies handling

If you have mutual dependencies issues or if your module leverages the package installation, you can set pin_only to true, and you use the package resource with require against pin_package define. Example:

pin_package { ['salt-minion', 'salt-common']:
  ensure   => $my_version,
  pin_only => true;

package { ['salt-minion', 'salt-common']:
  ensure  => $my_version,  # you can also use latest here, because you have already pinned
  require => Pin_package['salt-minion', 'salt-common'];


  • only Debian/RedHat families are supported: Debian, Ubuntu, RedHat, CentOS...
  • no test available


Feel free to make pull requests and/or open issues on my GitHub Repository

Please make a pull request to add $facts['os']['name'] (or tell me the string to add) for any missing OS, like as Scientific Linux or Oracle Linux

Release Notes/Contributors

Massimiliano Adamo