Mark Bergsma has submitted this change and it was merged. Change subject: Replace role::cache::ssl if statement with a selector ......................................................................
Replace role::cache::ssl if statement with a selector The existing if statement had broken indentation, typos in a variable name, and could be replaced by a shorter selector anyway. Change-Id: I500b8aa90a7961e6b31c67c91a20fd7a85025e9b --- M manifests/role/cache.pp 1 file changed, 7 insertions(+), 11 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index ce65b44..8336efd 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -578,17 +578,13 @@ # Assumes that LVS service IPs are setup elsewhere - # For unified or star certs we need to do a bit of - # mapping; in other cases we should be OK with the raw name - if $certname == 'unified.wikimedia.org' { - $check_cert = '*.wikipedia.org' - } elsif $cername == 'star.wikimedia.org' { - $check_cert = '*.wikimedia.org' - } elsif $cername == 'star.wikipedia.org' { - $check_cert = '*.wikipedia.org' - } else { - $check_cert = $certname - } + # For unified or star certs we need to do a bit of + # mapping; in other cases we should be OK with the raw name + $check_cert = $certname ? { + 'unified.wikimedia.org' => '*.wikipedia.org', + /^star\.(wiki[mp]edia\.org)$/ => "*.$1", + default => $certname + } # Nagios monitoring monitor_service { 'https': -- To view, visit https://gerrit.wikimedia.org/r/160001 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I500b8aa90a7961e6b31c67c91a20fd7a85025e9b Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma <m...@wikimedia.org> Gerrit-Reviewer: Mark Bergsma <m...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits