modules/postgres/manifests: quoting, spacing, linting
[mirror/dsa-puppet.git] / modules / postgres / manifests / backup_server.pp
index 0da5594..94eb01e 100644 (file)
@@ -27,12 +27,12 @@ class postgres::backup_server {
   }
   file { '/var/lib/dsa/postgres-make-base-backups':
     ensure => directory,
-    owner => 'debbackup',
-    mode => '0755',
+    owner  => 'debbackup',
+    mode   => '0755',
   }
   concat::fragment { 'puppet-crontab--postgres-make_base_backups':
-    target => '/etc/cron.d/puppet-crontab',
-    content  => @("EOF")
+    target  => '/etc/cron.d/puppet-crontab',
+    content => @("EOF")
       */30 * * * * debbackup sleep $(( RANDOM \% 1200 )); chronic ${$postgres::backup_server::globals::make_base_backups}
       | EOF
   }
@@ -47,11 +47,11 @@ class postgres::backup_server {
   }
   file { '/usr/local/bin/postgres-make-backup-sshauthkeys':
     content => template('postgres/backup_server/postgres-make-backup-sshauthkeys.erb'),
-    mode   => '0555',
+    mode    => '0555',
     notify  => Exec['postgres-make-backup-sshauthkeys'],
   }
   file { '/usr/local/bin/postgres-make-one-base-backup':
-    source  => 'puppet:///modules/postgres/backup_server/postgres-make-one-base-backup',
+    source => 'puppet:///modules/postgres/backup_server/postgres-make-one-base-backup',
     mode   => '0555'
   }
   file { '/etc/dsa/postgresql-backup/sshkeys-manual':
@@ -59,18 +59,18 @@ class postgres::backup_server {
     notify  => Exec['postgres-make-backup-sshauthkeys'],
   }
   concat { $postgres::backup_server::globals::sshkeys_sources:
-    notify  => Exec['postgres-make-backup-sshauthkeys'],
+    notify => Exec['postgres-make-backup-sshauthkeys'],
   }
   concat::fragment { 'postgresql-backup/source-sshkeys-header':
-    target => $postgres::backup_server::globals::sshkeys_sources ,
-    content  => @(EOF),
+    target  => $postgres::backup_server::globals::sshkeys_sources ,
+    content => @(EOF),
         # <name> <ip addresses> <key>
         | EOF
-    order  => '00',
+    order   => '00',
   }
   Concat::Fragment <<| tag == $postgres::backup_server::globals::tag_source_sshkey |>>
-  exec { "postgres-make-backup-sshauthkeys":
-    command => "/usr/local/bin/postgres-make-backup-sshauthkeys",
+  exec { 'postgres-make-backup-sshauthkeys':
+    command     => '/usr/local/bin/postgres-make-backup-sshauthkeys',
     refreshonly => true,
   }
 
@@ -78,23 +78,22 @@ class postgres::backup_server {
   # Maintain /etc/nagios/dsa-check-backuppg.conf
   #
   file { '/etc/dsa/postgresql-backup/dsa-check-backuppg.conf.d':
-    ensure => 'directory',
+    ensure  => 'directory',
     purge   => true,
     force   => true,
     recurse => true,
-    source  => 'puppet:///files/empty/',
-    notify => Exec['update dsa-check-backuppg-manual.conf'],
+    notify  => Exec['update dsa-check-backuppg-manual.conf'],
   }
   file { '/etc/dsa/postgresql-backup/dsa-check-backuppg.conf.d/manual.conf':
     content => template('postgres/backup_server/dsa-check-backuppg-manual.conf.erb'),
-    notify => Exec['update dsa-check-backuppg-manual.conf']
+    notify  => Exec['update dsa-check-backuppg-manual.conf']
   }
   File<<| tag == $postgres::backup_server::globals::tag_dsa_check_backupp |>>
-  exec { "update dsa-check-backuppg-manual.conf":
-    command  => @(EOF),
+  exec { 'update dsa-check-backuppg-manual.conf':
+    command     => @(EOF),
         perl -MYAML=LoadFile,Dump -MHash::Merge::Simple=merge -E 'say Dump(merge(map{LoadFile($_)}@ARGV))' /etc/dsa/postgresql-backup/dsa-check-backuppg.conf.d/*.conf > /etc/nagios/dsa-check-backuppg.conf
         | EOF
-    provider => shell,
+    provider    => shell,
     refreshonly => true,
   }