From: Peter Palfrader Date: Tue, 15 Oct 2019 11:01:35 +0000 (+0200) Subject: Catch empty *info when we get it from the functions in modules/deprecated X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=f5a5ce8713702acd7eec76d0aaa0168422e00ebd;p=mirror%2Fdsa-puppet.git Catch empty *info when we get it from the functions in modules/deprecated --- diff --git a/modules/deprecated/manifests/init.pp b/modules/deprecated/manifests/init.pp index f29c76565..df4a43873 100644 --- a/modules/deprecated/manifests/init.pp +++ b/modules/deprecated/manifests/init.pp @@ -3,4 +3,14 @@ class deprecated { $localinfo = yamlinfo('*') $nodeinfo = nodeinfo($::fqdn) $allnodeinfo = allnodeinfo('sshRSAHostKey ipHostNumber', 'purpose mXRecord physicalHost purpose') + + if ! ($localinfo.size > 0) { + fail('Cannot learn localinfo.') + } + if ! ($nodeinfo.size > 0) { + fail('Cannot learn nodeinfo.') + } + if ! ($allnodeinfo.size > 0) { + fail('Cannot learn allnodeinfo.') + } }