From 4372aea5bfc8ec0bfb45a49a823f5327254682cf Mon Sep 17 00:00:00 2001 From: Hugo Freire Date: Fri, 26 Oct 2018 13:12:53 +0200 Subject: [PATCH] Get architecture when no os/architecture exists --- manifests/oracle.pp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/manifests/oracle.pp b/manifests/oracle.pp index 7a6fdc5..637dbdc 100644 --- a/manifests/oracle.pp +++ b/manifests/oracle.pp @@ -206,12 +206,17 @@ define java::oracle ( } # set java architecture nomenclature - case $facts['os']['architecture'] { + $os_architecture = $facts['os']['architecture'] ? { + undef => $facts['architecture'], + default => $facts['os']['architecture'] + } + + case $os_architecture { 'i386' : { $arch = 'i586' } 'x86_64' : { $arch = 'x64' } 'amd64' : { $arch = 'x64' } default : { - fail ("unsupported platform ${$facts['os']['architecture']}") + fail ("unsupported platform ${$os_architecture}") } }