From 62d1b88fc3655c5a7fc2680670493548873c3690 Mon Sep 17 00:00:00 2001 From: Lucas Salibian Date: Sun, 19 Nov 2017 20:26:23 -0800 Subject: [PATCH] Use modern $facts hash --- manifests/params.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index a2b850b..89f36bb 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -13,7 +13,7 @@ $package = 'tftpd-hpa' $defaults = true $username = 'tftp' - case $::operatingsystem { + case $facts['operatingsystem'] { 'debian': { $directory = '/srv/tftp' $hasstatus = false @@ -21,7 +21,7 @@ } 'ubuntu': { # ubuntu now uses systemd - if versioncmp($::operatingsystemrelease, '15.04') >= 0 { + if versioncmp($facts['operatingsystemrelease'], '15.04') >= 0 { $provider = 'systemd' } else { $provider = 'upstart' @@ -30,7 +30,7 @@ $hasstatus = true } default: { - fail "${::operatingsystem} is not supported" + fail "${facts['operatingsystem']} is not supported" } } } @@ -48,7 +48,7 @@ $defaults = false $hasstatus = false $provider = undef - warning("tftp:: ${::operatingsystem} may not be supported") + warning("tftp:: ${facts['operatingsystem']} may not be supported") } } }