pe_nc_backup
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
- Puppet >= 6.17.0 < 8.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'jesse-pe_nc_backup', '2.0.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 PE primary server running
pe_nc_backup
Beginning with pe_nc_backup
include pe_nc_backup
Usage
class { 'pe_nc_backup':
path => '/opt/pe_nc_backup',
}
Limitations
Currently tested on PE 2019.8.z, PE 2021.7.z, PE 2023.2
PE 2019.8.z (Puppet 6) is not compatible / fails catalog compilation with puppetlabs-vcsrepo 6.0.0 and later due to removal of Puppet 6 support.
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.
Reference
Table of Contents
Classes
pe_nc_backup
: Creates backups of Puppet Enterprise's Node Classifier as json in a git repo.
Classes
pe_nc_backup
pe_nc_backup
Main entry point to pe_nc_backup
Examples
include pe_nc_backup
Parameters
The following parameters are available in the pe_nc_backup
class:
path
Data type: String
path to directory to store the backup git repo, backup script, and log file. The parent directory must already exist.
Default value: '/opt/pe_nc_backup'
ssl_dir
Data type: String
The path to the Puppet Agent's ssl directory on the PE primary server.
Default value: '/etc/puppetlabs/puppet/ssl'
log_level
Data type: Enum['debug', 'info', 'warn', 'error', 'fatal']
The verbosity of the Ruby logger writing to the log file. Possible values: 'debug', 'info', 'warn', 'error', 'fatal'.
Default value: 'info'
log_level_stdout
Data type: Enum['debug', 'info', 'warn', 'error', 'fatal']
The verbosity of the Ruby logger writing to STDOUT. Possible values: 'debug', 'info', 'warn', 'error', 'fatal'.
Default value: 'error'
stdout_log
Data type: Boolean
Whether to enable the STDOUT logger.
Default value: true
cron_hour
Data type: String
The hour for the cron job.
Default value: '*'
cron_minute
Data type: String
The minute for the cron job.
Default value: '*/5'
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 (>= 8.6.0 < 10.0.0)
- puppetlabs-vcsrepo (>= 5.5.0 < 7.0.0)