packages
Version information
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
Add this module to your Puppetfile:
mod 'qtechnologies-packages', '1.3.0'
Learn more about managing modules with a PuppetfileDocumentation
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+).
Dependencies
- puppetlabs-stdlib (>= 4.16.0 <9.0.0)
Copyright 2016 Q-Technologies Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.