mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2024-12-16 09:40:35 +00:00
fix dependencies (current state fails for puppet 3)
This commit is contained in:
parent
05450e49b9
commit
3c5794c13b
@ -87,9 +87,9 @@ class rsnapshot::config (
|
||||
|
||||
# merge the backup hashes to one if backup_default is set (defaults to true)
|
||||
if $backup_defaults {
|
||||
$backups = merge($backup, $default_backup_dirs)
|
||||
$backups = merge($backup, $default_backup_dirs)
|
||||
} else {
|
||||
$backups = $backup
|
||||
$backups = $backup
|
||||
}
|
||||
|
||||
# one of both interval or retain must be present
|
||||
@ -97,24 +97,24 @@ class rsnapshot::config (
|
||||
$interval = pick($hash['interval'], $rsnapshot::params::config_interval)
|
||||
}
|
||||
# rsnapshot wants numeric values
|
||||
if $link_dest {
|
||||
$link_dest_num = bool2num($link_dest)
|
||||
if $link_dest {
|
||||
$link_dest_num = bool2num($link_dest)
|
||||
}
|
||||
if $sync_first {
|
||||
$sync_first_num = bool2num($sync_first)
|
||||
if $sync_first {
|
||||
$sync_first_num = bool2num($sync_first)
|
||||
}
|
||||
if $use_lazy_deletes {
|
||||
$use_lazy_deletes_num = bool2num($use_lazy_deletes)
|
||||
if $use_lazy_deletes {
|
||||
$use_lazy_deletes_num = bool2num($use_lazy_deletes)
|
||||
}
|
||||
|
||||
file { $exclude_file:
|
||||
file { $exclude_file:
|
||||
ensure => 'file',
|
||||
}
|
||||
file { $config:
|
||||
content => template('rsnapshot/rsnapshot.erb')
|
||||
}
|
||||
$cronfile = "${cron_dir}/${host}"
|
||||
concat { "${cronfile}":
|
||||
concat { $cronfile:
|
||||
}
|
||||
$backup_levels.each |String $level| {
|
||||
if validate_hash($hash) {
|
||||
@ -139,7 +139,7 @@ class rsnapshot::config (
|
||||
$month = rand_from_array($c_month, "${host}.${level}")
|
||||
$weekday = rand_from_array($c_weekday, "${host}.${level}")
|
||||
concat::fragment { "${host}.${level}":
|
||||
target => "${cronfile}",
|
||||
target => $cronfile,
|
||||
content => template('rsnapshot/cron.erb'),
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "loomsen-rsnapshot",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"author": "loomsen",
|
||||
"summary": "Configures rsnapshot.",
|
||||
"license": "Apache-2.0",
|
||||
@ -13,8 +13,8 @@
|
||||
"rsync"
|
||||
],
|
||||
"requirements": [
|
||||
{ "name": "pe", "version_requirement": ">= 3.0.0" },
|
||||
{ "name": "puppet", "version_requirement": ">= 3.0.0" }
|
||||
{ "name": "pe", "version_requirement": ">= 4.0.0" },
|
||||
{ "name": "puppet", "version_requirement": ">= 4.0.0" }
|
||||
],
|
||||
"dependencies": [
|
||||
{ "name": "puppetlabs-stdlib","version_range": ">= 1.0.0" },
|
||||
|
Loading…
Reference in New Issue
Block a user