Alexandros Kosiaris has submitted this change and it was merged. (
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(+), 4 deletions(-)
Approvals:
Alexandros Kosiaris: Verified; Looks good to me, approved
diff --git a/modules/backup/manifests/openldapset.pp
b/modules/backup/manifests/openldapset.pp
index 3832b28..52d73b4 100644
--- a/modules/backup/manifests/openldapset.pp
+++ b/modules/backup/manifests/openldapset.pp
@@ -20,9 +20,7 @@
'ClientRunBeforeJob' => '/etc/bacula/scripts/openldap-pre',
'ClientRunAfterJob' => '/etc/bacula/scripts/openldap-post',
}
- bacula::client::job { 'openldap-backup':
- fileset => 'openldap',
- jobdefaults => $profile::backup::host::jobdefaults,
+ backup::set { 'openldap':
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: merged
Gerrit-Change-Id: I200662d81df7a733e7a4a63ffb3d146212dab51b
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits