puppetserver_gem_repo

pdk
Synchronize puppetserver gems between masters

Tom Kishel

tkishel

6,385 downloads

3,435 latest version

5.0 quality score

Version information

  • 2.0.2 (latest)
  • 2.0.1
  • 2.0.0
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Dec 17th 2018
This version is compatible with:
  • Puppet Enterprise 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 < 7.0.0
  • CentOS
    ,
    RedHat
    ,
    Ubuntu

Start using this module

Documentation

tkishel/puppetserver_gem_repo — version 2.0.2 Dec 17th 2018

puppetserver_gem_repo

Table of Contents

  1. Description
  2. Setup
  3. Usage
  4. Reference
  5. Limitations

Description

This module will create a gem repository populated with the gems added to the puppetserver service on the master of masters (aka primary master). This module will sync that gem repository to compile masters (and the replica master, if present) allowing this module to install those gems (and their dependencies) on the other masters via puppetserver_gem_repo::gem resources. This is particularly valuable when the other masters do not have internet access.

Setup

  1. Install this module on the primary master.
  2. Apply the puppetserver_gem_repo class to the PE Master node group via the Console.
  3. Run puppet agent -t on the primary master.
  4. Run puppet agent -t on the other masters.

Usage

Install a puppetserver gem on the primary master, manually or via a manifest.

Specify the same gem as a puppetserver_gem_repo::gem resource on the other masters. For example:

node 'compile-master-*.example.com' {
  puppetserver_gem_repo::gem {
    name               => 'puppet-resource_api',
    version            => '1.0.0',
    install_into_agent => true,
  }
}

To specify multiple gems, specify the puppetserver_gem_repo::gems class on the other masters, and specify the gems via Hiera. For example:

node 'compile-master-*.example.com' {
  include puppetserver_gem_repo::gems
}
---
 puppetserver_gem_repo::gems:
   hiera-eyaml:
     version:             2.1.0
     install_into_agent:  true
   jruby-ldap:
     install_into_agent:  false

Reference

Parameters

name

String. Required, with a default of the title of the resource.

The name of the puppetserver gem to install from the primary master.

version

String. Optional, with a default of 'present'.

The version of the puppetserver gem to install from the primary master.

install_into_agent

Boolean. Optional, with a default of false.

Whether to install the puppetserver gem into puppet in addition to the puppetserver service.

This is particularly valuable with 'hiera-eyaml' gem, allowing the puppet lookup command to use the 'eyaml' backend.

Note: While this module was initially developed to sync the 'hiera-eyaml' gem, it is not limited to syncing that gem.

Limitations

This module installs the 'builder' gem into puppet on the primary master. If your primary master does not have internet access, manually install the gem on the primary master before using this module. For example:

/opt/puppetlabs/puppet/bin/gem install builder --local builder-*.gem