Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/176227
Change subject: ocg: fix the redis_password errors ...................................................................... ocg: fix the redis_password errors * Require rather than include password::redis in the role, so that it's already defined once we get to evaluating the ocg class * Make however the puppet compilation fail when we encounter and undefined or empty password. Change-Id: I8d9c81a603a0f491b964c9297dcaef6430ed4035 Signed-off-by: Giuseppe Lavagetto <glavage...@wikimedia.org> --- M manifests/role/ocg.pp M modules/ocg/manifests/init.pp 2 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/27/176227/1 diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp index b130560..4cb1fe7 100644 --- a/manifests/role/ocg.pp +++ b/manifests/role/ocg.pp @@ -13,7 +13,7 @@ description => 'offline content generator for MediaWiki Collection extension', } - include passwords::redis + require passwords::redis include ::ocg include ::ocg::nagios include ::ocg::ganglia diff --git a/modules/ocg/manifests/init.pp b/modules/ocg/manifests/init.pp index 871aeef..5cf6ac2 100644 --- a/modules/ocg/manifests/init.pp +++ b/modules/ocg/manifests/init.pp @@ -15,7 +15,7 @@ $service_port = 8000, $redis_host = 'localhost', $redis_port = 6379, - $redis_password = $::passwords::redis::main_password, # HACK: Temp fix for https://phabricator.wikimedia.org/T76111 + $redis_password = undef, $statsd_host = 'localhost', $statsd_port = 8125, $statsd_is_txstatsd = 0, @@ -25,7 +25,12 @@ $output_dir = '/srv/deployment/ocg/output', $postmortem_dir = '/srv/deployment/ocg/postmortem', $log_dir = '/srv/deployment/ocg/log' -) { + ) { + + unless $redis_password { + fail("An empty redis password is not admitted!") + } + package { 'ocg/ocg': provider => 'trebuchet', } -- To view, visit https://gerrit.wikimedia.org/r/176227 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d9c81a603a0f491b964c9297dcaef6430ed4035 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits