aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Backlund <tmb@mageia.org>2015-10-20 11:26:46 +0300
committerThomas Backlund <tmb@mageia.org>2015-10-20 11:26:46 +0300
commitf62e505277cb9ce2132653a1cd0f33c3e59b153a (patch)
treeddcb404da20ef5a132fae0f644c3b3a937b22ac9
parentc25c148826abe0dc09eeaa3ebe2c927b44708f2f (diff)
downloadpuppet-f62e505277cb9ce2132653a1cd0f33c3e59b153a.tar
puppet-f62e505277cb9ce2132653a1cd0f33c3e59b153a.tar.gz
puppet-f62e505277cb9ce2132653a1cd0f33c3e59b153a.tar.bz2
puppet-f62e505277cb9ce2132653a1cd0f33c3e59b153a.tar.xz
puppet-f62e505277cb9ce2132653a1cd0f33c3e59b153a.zip
lint fixes for rsnapshot
-rw-r--r--modules/rsnapshot/manifests/init.pp110
-rw-r--r--modules/rsnapshot/templates/rsnapshot.conf1
2 files changed, 55 insertions, 56 deletions
diff --git a/modules/rsnapshot/manifests/init.pp b/modules/rsnapshot/manifests/init.pp
index fdfa1616..5e8b4618 100644
--- a/modules/rsnapshot/manifests/init.pp
+++ b/modules/rsnapshot/manifests/init.pp
@@ -1,30 +1,30 @@
class rsnapshot {
class base($confdir = '/backups/conf') {
- package { ['rsnapshot']: }
+ package { ['rsnapshot']: }
- file { $confdir:
- ensure => directory,
- owner => root,
- group => root,
- mode => 0700,
- }
+ file { $confdir:
+ ensure => directory,
+ owner => root,
+ group => root,
+ mode => '0700',
+ }
- @rsnapshot::cron_file { 'hourly': }
- @rsnapshot::cron_file { 'daily': }
- @rsnapshot::cron_file { 'weekly': }
- @rsnapshot::cron_file { 'monthly': }
+ @rsnapshot::cron_file { 'hourly': }
+ @rsnapshot::cron_file { 'daily': }
+ @rsnapshot::cron_file { 'weekly': }
+ @rsnapshot::cron_file { 'monthly': }
}
define cron_file($rsnapshot_conf = []) {
- $filepath = "/tmp/cron.${name}_rsnapshot-backups"
- $rsnapshot_arg = $name
- file { $filepath:
- ensure => present,
- content => template('rsnapshot/cron_file'),
- owner => root,
- group => root,
- mode => 0755,
- }
+ $filepath = "/tmp/cron.${name}_rsnapshot-backups"
+ $rsnapshot_arg = $name
+ file { $filepath:
+ ensure => present,
+ content => template('rsnapshot/cron_file'),
+ owner => root,
+ group => root,
+ mode => '0755',
+ }
}
# - 'backup' is an array of "source destination" to backup
@@ -33,42 +33,42 @@ class rsnapshot {
# backups that should be kept. If you don't want hourly, daily,
# weekly or monthly backups, set ${x}_interval to '0'
define backup(
- $snapshot_root = '/backups',
- $one_fs = '1',
- $backup = [],
- $backup_script = [],
- $hourly_interval = '0',
- $daily_interval = '6',
- $weekly_interval = '4',
- $monthly_interval = '3'
+ $snapshot_root = '/backups',
+ $one_fs = '1',
+ $backup = [],
+ $backup_script = [],
+ $hourly_interval = '0',
+ $daily_interval = '6',
+ $weekly_interval = '4',
+ $monthly_interval = '3'
) {
- $conffile = "${rsnapshot::base::confdir}/${name}.conf"
- file { $conffile:
- owner => root,
- group => root,
- mode => 0700,
- content => template('rsnapshot/rsnapshot.conf'),
- }
+ $conffile = "${rsnapshot::base::confdir}/${name}.conf"
+ file { $conffile:
+ owner => root,
+ group => root,
+ mode => '0700',
+ content => template('rsnapshot/rsnapshot.conf'),
+ }
- if ($hourly_interval != '0') {
- Rsnapshot::Cron_file <| title == 'hourly' |> {
- rsnapshot_conf +> $conffile,
- }
- }
- if ($daily_interval != '0') {
- Rsnapshot::Cron_file <| title == 'daily' |> {
- rsnapshot_conf +> $conffile,
- }
- }
- if ($weekly_interval != '0') {
- Rsnapshot::Cron_file <| title == 'weekly' |> {
- rsnapshot_conf +> $conffile,
- }
- }
- if ($monthly_interval != '0') {
- Rsnapshot::Cron_file <| title == 'monthly' |> {
- rsnapshot_conf +> $conffile,
- }
- }
+ if ($hourly_interval != '0') {
+ Rsnapshot::Cron_file <| title == 'hourly' |> {
+ rsnapshot_conf +> $conffile,
+ }
+ }
+ if ($daily_interval != '0') {
+ Rsnapshot::Cron_file <| title == 'daily' |> {
+ rsnapshot_conf +> $conffile,
+ }
+ }
+ if ($weekly_interval != '0') {
+ Rsnapshot::Cron_file <| title == 'weekly' |> {
+ rsnapshot_conf +> $conffile,
+ }
+ }
+ if ($monthly_interval != '0') {
+ Rsnapshot::Cron_file <| title == 'monthly' |> {
+ rsnapshot_conf +> $conffile,
+ }
+ }
}
}
diff --git a/modules/rsnapshot/templates/rsnapshot.conf b/modules/rsnapshot/templates/rsnapshot.conf
index d3da0495..9ea9368f 100644
--- a/modules/rsnapshot/templates/rsnapshot.conf
+++ b/modules/rsnapshot/templates/rsnapshot.conf
@@ -207,4 +207,3 @@ backup <%= b %>
<%- for bs in @backup_script -%>
backup_script <%= bs %>
<%- end -%>
-