Only use the strict variables workaround if using strict variables

This should avoid issues with defined on earlier versions of puppet
This commit is contained in:
Morgan Haskel 2015-05-11 10:26:20 -07:00
parent 424b7540bf
commit 3838c666f5

View file

@ -6,7 +6,7 @@ class apt::params {
# prior to puppet 3.5.0, defined couldn't test if a variable was defined # 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. # 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 = { $xfacts = {
'lsbdistcodename' => $::lsbdistcodename, 'lsbdistcodename' => $::lsbdistcodename,
'lsbdistrelease' => $::lsbdistrelease, 'lsbdistrelease' => $::lsbdistrelease,