pe_nc_backup

pdk
Creates backups of Puppet Enterprise's Node Classifier as json in a local git repo.

Jesse Reynolds

jesse

7,810 downloads

639 latest version

5.0 quality score

Version information

  • 1.1.0 (latest)
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 0.2.2
  • 0.1.6
  • 0.1.4
  • 0.1.1
  • 0.1.0
released Nov 23rd 2020
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
  • RedHat
    ,
    Ubuntu

Start using this module

Documentation

jesse/pe_nc_backup — version 1.1.0 Nov 23rd 2020

pe_nc_backup

build status

Table of Contents

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

Description

This module installs the ncio ruby gem and a cron job to drive it in order to record changes to your Puppet Enterprise Node Classification over time. The data is retrieved as a single JSON file, prettified, and stored in git.

If an ssh private key is present that provides authentication to a remote Git repo this module can also take care of pushing updates from the local git repo to the remote.

Setup

Setup Requirements

  • git must be installed on the master running pe_nc_backup

Beginning with pe_nc_backup

include pe_nc_backup

Usage

class { 'pe_nc_backup':
  path => '/opt/pe_nc_backup',
}

Reference

Class: pe_nc_backups

Parameters:

  • path - path to directory to store the backup git repo, backup script, and log file. Default: /opt/pe_nc_backup/. The parent directory must already exist.
  • ssl_dir - The path to the Puppet Agent's ssl directory on the master. Default: /etc/puppetlabs/puppet/ssl.
  • log_level - The verbosity of the Ruby logger writing to the log file. Possible values: 'debug', 'info', 'warn', 'error', 'fatal'. Default: info.
  • log_level_stdout - The verbosity of the Ruby logger writing to STDOUT. Possible values: 'debug', 'info', 'warn', 'error', 'fatal'. Default: error.
  • stdout_log - Whether to enable the STDOUT logger. Boolean. Default: true
  • cron_hour - The hour for the cron job. String. Default: *
  • cron_minute - The minute for the cron job. String. Default: */5 (every 5 minutes)

Limitations

Currently tested on PE 2019.8.1

Development

Contributions welcome!

  • Fork it
  • make a PR from a feature branch
  • include tests if you can

Executing the tests:

pdk validate
pdk test unit

Release

git commit
git tag x.y.z
git push --tags

Look for the status of the build of the tag, not of the main branch, on the travis build page

Look for the new version on the Forge page

Build and deploy takes a couple of minutes.