Alexandros Kosiaris has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347837 )

Change subject: backup::set: Allow passing an $extras config hash
......................................................................

backup::set: Allow passing an $extras config hash

Allow backup::set to accept a config Hash that is pass directly to
bacula::client::job. That does expose a bit of bacula's Job Resource
configuration to the caller but it allows for more flexiblity. Default
to under to maintain compatibility. Amend openldapset to use the
backup::set now instead

Change-Id: I200662d81df7a733e7a4a63ffb3d146212dab51b
---
M modules/backup/manifests/openldapset.pp
M modules/backup/manifests/set.pp
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/37/347837/1

diff --git a/modules/backup/manifests/openldapset.pp 
b/modules/backup/manifests/openldapset.pp
index 3832b28..cb96279 100644
--- a/modules/backup/manifests/openldapset.pp
+++ b/modules/backup/manifests/openldapset.pp
@@ -20,8 +20,7 @@
         'ClientRunBeforeJob' => '/etc/bacula/scripts/openldap-pre',
         'ClientRunAfterJob' => '/etc/bacula/scripts/openldap-post',
     }
-    bacula::client::job { 'openldap-backup':
-        fileset     => 'openldap',
+    backup::set { 'openldap':
         jobdefaults => $profile::backup::host::jobdefaults,
         extras      => $run_scripts,
     }
diff --git a/modules/backup/manifests/set.pp b/modules/backup/manifests/set.pp
index 9a0abca..3c0f936 100644
--- a/modules/backup/manifests/set.pp
+++ b/modules/backup/manifests/set.pp
@@ -1,10 +1,11 @@
 # backup::set is probably what you want.
-define backup::set {
+define backup::set($extras=undef) {
     if defined(Class['profile::backup::host']) {
         $jobdefaults=$profile::backup::host::jobdefaults
         @bacula::client::job { "${name}-${jobdefaults}":
             fileset     => $name,
             jobdefaults => $jobdefaults,
+            extras      => $extras,
         }
 
         $motd_content = "#!/bin/sh\necho \"Backed up on this host: ${name}\""

-- 
To view, visit https://gerrit.wikimedia.org/r/347837
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I200662d81df7a733e7a4a63ffb3d146212dab51b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to