From: Morgan Haskel Date: Mon, 11 May 2015 17:26:20 +0000 (-0700) Subject: Only use the strict variables workaround if using strict variables X-Git-Tag: 2.1.0~8^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=3838c666f561278f2caa73d50d392bfa2f9f8b1f;p=puppet-modules%2Fpuppetlabs-apt.git Only use the strict variables workaround if using strict variables This should avoid issues with defined on earlier versions of puppet --- 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,