Merge pull request #617 from hunner/strict_error
(MODULES-3414) Limit non-strict parsing to pre-3.5.0 only
This commit is contained in:
commit
ade1eeb9d2
3 changed files with 14 additions and 7 deletions
|
@ -4,9 +4,9 @@ class apt::params {
|
||||||
fail('This module only works on Debian or derivatives like Ubuntu')
|
fail('This module only works on Debian or derivatives like Ubuntu')
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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 ! $::settings::strict_variables {
|
if $::puppetversion and versioncmp($::puppetversion, '3.5.0') < 0 {
|
||||||
$xfacts = {
|
$xfacts = {
|
||||||
'lsbdistcodename' => $::lsbdistcodename,
|
'lsbdistcodename' => $::lsbdistcodename,
|
||||||
'lsbdistrelease' => $::lsbdistrelease,
|
'lsbdistrelease' => $::lsbdistrelease,
|
||||||
|
|
|
@ -4,6 +4,7 @@ describe 'apt::key', :type => :define do
|
||||||
let(:facts) { {
|
let(:facts) { {
|
||||||
:lsbdistid => 'Debian',
|
:lsbdistid => 'Debian',
|
||||||
:osfamily => 'Debian',
|
:osfamily => 'Debian',
|
||||||
|
:puppetversion => Puppet.version,
|
||||||
} }
|
} }
|
||||||
GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
|
GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ describe 'apt::source', :type => :define do
|
||||||
:lsbdistid => 'Debian',
|
:lsbdistid => 'Debian',
|
||||||
:lsbdistcodename => 'wheezy',
|
:lsbdistcodename => 'wheezy',
|
||||||
:osfamily => 'Debian',
|
:osfamily => 'Debian',
|
||||||
|
:puppetversion => Puppet.version,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -34,6 +35,7 @@ describe 'apt::source', :type => :define do
|
||||||
:lsbdistid => 'Debian',
|
:lsbdistid => 'Debian',
|
||||||
:lsbdistcodename => 'wheezy',
|
:lsbdistcodename => 'wheezy',
|
||||||
:osfamily => 'Debian'
|
:osfamily => 'Debian'
|
||||||
|
:puppetversion => Puppet.version,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
let :params do
|
let :params do
|
||||||
|
@ -88,7 +90,8 @@ describe 'apt::source', :type => :define do
|
||||||
{
|
{
|
||||||
:lsbdistid => 'Debian',
|
:lsbdistid => 'Debian',
|
||||||
:lsbdistcodename => 'wheezy',
|
:lsbdistcodename => 'wheezy',
|
||||||
:osfamily => 'Debian'
|
:osfamily => 'Debian',
|
||||||
|
:puppetversion => Puppet.version,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
let :params do
|
let :params do
|
||||||
|
@ -107,7 +110,8 @@ describe 'apt::source', :type => :define do
|
||||||
{
|
{
|
||||||
:lsbdistid => 'Debian',
|
:lsbdistid => 'Debian',
|
||||||
:lsbdistcodename => 'wheezy',
|
:lsbdistcodename => 'wheezy',
|
||||||
:osfamily => 'Debian'
|
:osfamily => 'Debian',
|
||||||
|
:puppetversion => Puppet.version,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
let :params do
|
let :params do
|
||||||
|
@ -126,7 +130,8 @@ describe 'apt::source', :type => :define do
|
||||||
{
|
{
|
||||||
:lsbdistid => 'Debian',
|
:lsbdistid => 'Debian',
|
||||||
:lsbdistcodename => 'wheezy',
|
:lsbdistcodename => 'wheezy',
|
||||||
:osfamily => 'Debian'
|
:osfamily => 'Debian',
|
||||||
|
:puppetversion => Puppet.version,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
let :params do
|
let :params do
|
||||||
|
@ -146,7 +151,8 @@ describe 'apt::source', :type => :define do
|
||||||
let :facts do
|
let :facts do
|
||||||
{
|
{
|
||||||
:lsbdistid => 'Debian',
|
:lsbdistid => 'Debian',
|
||||||
:osfamily => 'Debian'
|
:osfamily => 'Debian',
|
||||||
|
:puppetversion => Puppet.version,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue