]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Only use the strict variables workaround if using strict variables
authorMorgan Haskel <morgan@puppetlabs.com>
Mon, 11 May 2015 17:26:20 +0000 (10:26 -0700)
committerMorgan Haskel <morgan@puppetlabs.com>
Mon, 11 May 2015 17:55:46 +0000 (10:55 -0700)
This should avoid issues with defined on earlier versions of puppet

manifests/params.pp

index 0b1afe74aa66b0bcde2d50aa63edbb64188270ce..d4f838946a342dfcbc7059d2138037b52203841c 100644 (file)
@@ -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,