1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2024-12-16 17:50:34 +00:00
puppet-rsnapshot/manifests/init.pp

28 lines
913 B
ObjectPascal
Raw Normal View History

2015-12-19 10:16:05 +00:00
# == Class: rsnapshot
#
# Manages rsnapshot.
#
# === Parameters
#
class rsnapshot (
$hosts = $rsnapshot::params::hosts,
$conf_d = $rsnapshot::params::conf_d,
$logpath = $rsnapshot::params::config_logpath,
$lockpath = $rsnapshot::params::config_lockpath,
$default_backup = $rsnapshot::params::config_default_backup,
2015-12-21 10:43:50 +00:00
$package_name = $rsnapshot::params::package_name,
$package_ensure = $rsnapshot::params::package_ensure,
$cron = $rsnapshot::params::cron,
2015-12-19 10:16:05 +00:00
) inherits rsnapshot::params {
2015-12-21 15:34:29 +00:00
if $::puppetversion =~ /^(1|2|3)/ {
fail('This module requires Puppet 4')
2015-12-21 15:34:29 +00:00
}
2015-12-19 10:16:05 +00:00
if $hosts {
class { '::rsnapshot::install': }->
class { '::rsnapshot::config': }
contain '::rsnapshot::install'
contain '::rsnapshot::config'
2015-12-19 10:16:05 +00:00
}
}