Alexandros Kosiaris has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/347836 )
Change subject: Move backup::openldapset into the respective roles
......................................................................
Move backup::openldapset into the respective roles
It's place is clearly not in site.pp, so move the calls into the
respective roles.
Had to fix a bit the memory check for openldap so as to adhere to the
140 characters long line rule
Change-Id: Ib3bf7d425fa617c1de8edb30b799ade42c55f08e
---
M manifests/site.pp
M modules/role/manifests/openldap/corp.pp
M modules/role/manifests/openldap/labs.pp
3 files changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/36/347836/1
diff --git a/manifests/site.pp b/manifests/site.pp
index b60a22a..7689400 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2364,7 +2364,6 @@
node /(dubnium|pollux)\.wikimedia\.org/ {
role(openldap::corp)
include ::standard
- backup::openldapset {'openldap_oit':}
}
node 'poolcounter1001.eqiad.wmnet' {
@@ -2548,7 +2547,6 @@
role(openldap::labs)
include ::standard
include ::base::firewall
- backup::openldapset {'openldap_labs':}
}
# Silver is the new home of the wikitech web server.
diff --git a/modules/role/manifests/openldap/corp.pp
b/modules/role/manifests/openldap/corp.pp
index d4e1d8a..d7ba623 100644
--- a/modules/role/manifests/openldap/corp.pp
+++ b/modules/role/manifests/openldap/corp.pp
@@ -44,6 +44,7 @@
critical => true,
}
+ backup::openldapset {'openldap_oit':}
# NOTE: username is in double quotes cause otherwise it get's auto split
# into array hence the nested quoting
diamond::collector { 'OpenLDAP':
diff --git a/modules/role/manifests/openldap/labs.pp
b/modules/role/manifests/openldap/labs.pp
index afd0fc5..68efb1e 100644
--- a/modules/role/manifests/openldap/labs.pp
+++ b/modules/role/manifests/openldap/labs.pp
@@ -50,9 +50,11 @@
cron { 'restart_slapd':
ensure => present,
minute => fqdn_rand(59, $title),
- command => '/bin/ps -C slapd -o pmem= | awk \'{sum+=$1} END { if (sum
<= 50.0) exit 1 }\' && /bin/systemctl restart slapd >/dev/null 2>/dev/null',
+ command => "/bin/ps -C slapd -o pmem= | awk '{sum+=\$1} END { if (sum
<= 50.0) exit 1 }' \
+ && /bin/systemctl restart slapd >/dev/null 2>/dev/null",
}
+ backup::openldapset {'openldap_labs':}
$monitor_pass = $passwords::openldap::labs::monitor_pass
diamond::collector { 'OpenLDAP':
settings => {
--
To view, visit https://gerrit.wikimedia.org/r/347836
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3bf7d425fa617c1de8edb30b799ade42c55f08e
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