GithubHelp home page GithubHelp logo

puppet-packages's Introduction

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::remove:
  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+).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.