Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/179472
Change subject: apt: fix for failure case ...................................................................... apt: fix for failure case When failing to recognize the lsbdistid fact, the apt class would not fail gracefully with our error message, but complaining that fail() is a statement function, not an rvalue function (so it doesn't return a value). This should fix that case and fail gracefully Change-Id: I29a617352d5194f0e25c7f6df4e83a83d0dffb81 Signed-off-by: Giuseppe Lavagetto <glavage...@wikimedia.org> --- M modules/apt/manifests/init.pp 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/72/179472/1 diff --git a/modules/apt/manifests/init.pp b/modules/apt/manifests/init.pp index fa47f91..43f792f 100644 --- a/modules/apt/manifests/init.pp +++ b/modules/apt/manifests/init.pp @@ -33,10 +33,10 @@ require => Package['python-apt'], } - $components = $::lsbdistid ? { - 'Debian' => 'main backports thirdparty', - 'Ubuntu' => 'main universe thirdparty', - default => fail('Unrecognized operating system'), + case $::lsbdistid { + 'Debian': { $components = 'main backports thirdparty' } + 'Ubuntu': { $components = 'main universe thirdparty' } + default: { fail('Unrecognized operating system') } } apt::repository { 'wikimedia': -- To view, visit https://gerrit.wikimedia.org/r/179472 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29a617352d5194f0e25c7f6df4e83a83d0dffb81 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