Forge Home

packages

Puppet module to manage the easy installation of packages across hiera

11,774 downloads

515 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.3.0 (latest)
  • 1.2.3
  • 1.2.2
  • 1.2.1
  • 1.2.0
  • 1.1.0
  • 1.0.2
  • 1.0.1
  • 1.0.0
released May 5th 2023
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 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, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 8.0.0
  • , , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'qtechnologies-packages', '1.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add qtechnologies-packages
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install qtechnologies-packages --version 1.3.0

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.

Download

Documentation

qtechnologies/packages — version 1.3.0 May 5th 2023

packages

Table of Contents

Description

Puppet module to easily manage a list of operating system packages across hiera. It tries to make it efficient to install packages across different Linux systems within the same Hiera scope. Common packages can be listed under the Kernel type, while more unique packages can be listed by the OS family.

By default, the listed items are interpreted as package name and Puppet will just make sure they are installed (i.e. version is not managed). To manage the version provide an array of Strings instead of a just a String. The first element will be interpreted as the package name and the second argument is the version to match (this is just passed through to the Puppet package resource, so 'latest' can also be specified.

Additionally, packages can be put into an ignore group. This is most helpful when you generally want to manage a package, but you don't want to in a specific role because it uses a class that already manages that package.

Assumptions

  • it set Macports as the package provider for OSX
  • it set Zypper as the package provider for Suse systems
  • it uses the default for other platforms

Limitations

Specifying a specific version may be troublesome if you are managing operating systems at different major versions as there is no way to differentiate for each OS release. I could add another layer into the Hash to match OS release, but that will get messy and defeat the purpose of trying to simplify.

Instructions

Call the class from your code, e.g.

class { 'packages': }

Specify hiera details along the following lines:

################################################################################
#
# Packages
#
################################################################################
packages::add: 
  Linux:
    - [git,'latest']
    - curl
    - iftop
    - wget
    - rsync
    - less
    - iotop
    - lvm2
    - screen
  Darwin:
    - watch
  Debian:
    - bind9utils
    - bsd-mailx
    - iputils-arping
    - iputils-clockdiff
    - iputils-ping
    - iputils-tracepath
    - vim
    - manpages
    - dlocate
    - rsyslog
  RedHat:
    - bind-utils
    - mailx
    - iputils
    - vim-enhanced
    - man-pages
    - [rsyslog,'7.4.7-12.el7']
  Suse:
    - bind-utils
    - iputils
    - vim
    - man
    - man-pages

packages::remove:
  Linux:
    - pdsh

packages::ignore:
  Linux:
    - openssh-server

Issues

This module is using hiera data that is embedded in the module rather than using a params class. This may not play nicely with other modules using the same technique unless you are using hiera 3.0.6 and above (PE 2015.3.2+).