bs_backup

A puppet module which manage file backup, most useful when your config files are managed by inifile or augeas and so on.

alameow

greatboy

8,163 downloads

8,163 latest version

3.0 quality score

Version information

  • 0.1.0 (latest)
released Mar 23rd 2015
This version is compatible with:
  • Puppet Enterprise >= 3.0.0
  • Puppet >= 3.0.0
  • RedHat
    ,
    CentOS
    ,
    Scientific
    ,
    OEL
    ,
    OracleLinux

Start using this module

Documentation

greatboy/bs_backup — version 0.1.0 Mar 23rd 2015

Backup Your config file

About

This module will help you backup config files which managed by inifile or augeas and so on.

Usage

For example, In config.pp:

class <module_name>::config {
  file_line { 'add-limits':
    path => '/etc/pam.d/login',
    line => 'session    required     pam_limits.so',
    after => '-session   optional     pam_ck_connector.so',
    multiple => false,
  }
}

Then, In you backup.pp

class <module_name>::backup {
  bs_backup { '/etc/pam.d/login':
    config_class => '<module_name>::config',
  }
}

In your init.pp

class <module_name> {
  contain <module_name>::install
  contain <module_name>::config
  contain <module_name>::service
  include <module_name>::backup
}

Now, File['/etc/pam.d/login'] will backup automaticly.