1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2025-09-13 15:59:28 +00:00

remove class inheritance in install.pp

This commit is contained in:
Norbert Varzariu
2016-01-18 19:54:53 +01:00
parent abae53b1ad
commit 0b21f0e751
5 changed files with 15 additions and 70 deletions

View File

@@ -7,9 +7,9 @@ class rsnapshot::config (
) {
# these are global settings, no point in setting them per host
$config_version = $rsnapshot::params::config_version
$lockpath = pick($rsnapshot::lockpath, $rsnapshot::params::config_lockpath)
$conf_d = pick($rsnapshot::conf_d, $rsnapshot::params::conf_d)
$snapshot_root = pick($hosts['snapshot_root'], $rsnapshot::params::config_snapshot_root)
$lockpath = pick($rsnapshot::lockpath, $rsnapshot::params::config_lockpath, '/var/run/rsnapshot')
$conf_d = pick($rsnapshot::conf_d, $rsnapshot::params::conf_d, '/etc/rsnapshot')
$snapshot_root = pick($hosts['snapshot_root'], $rsnapshot::params::config_snapshot_root, '/backup')
$default_cron = assert_empty_hash($::rsnapshot::cron)
# make sure lock path and conf path exist
file { $conf_d:

View File

@@ -14,7 +14,7 @@ class rsnapshot (
$package_ensure = $rsnapshot::params::package_ensure,
$cron = $rsnapshot::params::cron,
) inherits rsnapshot::params {
if $::puppetversion =~ /^(1|2|3)/ {
if $puppetversion =~ /^(1|2|3)/ {
fail('This module requires Puppet 4')
}
if $hosts {

View File

@@ -1,7 +1,7 @@
# == Class: rsnapshot::install
#
# Installs the rsnapshot package.
class rsnapshot::install inherits rsnapshot {
class rsnapshot::install {
case $::operatingsystem {
/^CentOS$/: { include epel }
default: {}