From 3838c666f561278f2caa73d50d392bfa2f9f8b1f Mon Sep 17 00:00:00 2001 From: Morgan Haskel Date: Mon, 11 May 2015 10:26:20 -0700 Subject: [PATCH] Only use the strict variables workaround if using strict variables This should avoid issues with defined on earlier versions of puppet --- manifests/params.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index 0b1afe7..d4f8389 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -6,7 +6,7 @@ class apt::params { # prior to puppet 3.5.0, defined couldn't test if a variable was defined # strict variables wasn't added until 3.5.0, so this should be fine. - if versioncmp($::puppetversion, '3.5.0') < 0 { + if ! $::settings::strict_variables { $xfacts = { 'lsbdistcodename' => $::lsbdistcodename, 'lsbdistrelease' => $::lsbdistrelease,