pe_nc_backup
Version information
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
- ,
Start using this module
Add this module to your Puppetfile:
mod 'jesse-pe_nc_backup', '1.1.0'
Learn more about managing modules with a PuppetfileDocumentation
pe_nc_backup
Table of Contents
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: truecron_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.
Changelog
All notable changes to this project will be documented in this file.
Release 1.0.1
- Fix issue with ssldir determination introduced in 1.0.0
- Set new ssl_dir parameter to /etc/puppetlabs/puppet/ssl - may be overridden
- Now uses a template for the backup script so that ssl_dir can be passed in (Thanks @albatrossflavour!)
Release 1.0.0
- Attempt to improve reliability of ssldir determination
Release 0.1.1 2017-09-11
Actually tested on production now.
Bugfixes
- Creates the bin directory
- Handles initial commit of json file correctly
- Works in the correct directory
Release 0.1.0 2017-09-11
Features
- Initial version
Bugfixes
Known Issues
Dependencies
- puppetlabs-stdlib (>= 4.13.1 < 7.0.0)
- puppetlabs-vcsrepo (>= 1.3.0 < 4.0.0)