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
- # strict variables wasn't added until 3.5.0, so this should be fine.
- if ! $::settings::strict_variables {
+ # 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 $::puppetversion and versioncmp($::puppetversion, '3.5.0') < 0 {
$xfacts = {
'lsbdistcodename' => $::lsbdistcodename,
'lsbdistrelease' => $::lsbdistrelease,
:lsbdistid => 'Debian',
:lsbdistcodename => 'wheezy',
:osfamily => 'Debian',
+ :puppetversion => Puppet.version,
}
end
:lsbdistid => 'Debian',
:lsbdistcodename => 'wheezy',
:osfamily => 'Debian'
+ :puppetversion => Puppet.version,
}
end
let :params do
{
:lsbdistid => 'Debian',
:lsbdistcodename => 'wheezy',
- :osfamily => 'Debian'
+ :osfamily => 'Debian',
+ :puppetversion => Puppet.version,
}
end
let :params do
{
:lsbdistid => 'Debian',
:lsbdistcodename => 'wheezy',
- :osfamily => 'Debian'
+ :osfamily => 'Debian',
+ :puppetversion => Puppet.version,
}
end
let :params do
{
:lsbdistid => 'Debian',
:lsbdistcodename => 'wheezy',
- :osfamily => 'Debian'
+ :osfamily => 'Debian',
+ :puppetversion => Puppet.version,
}
end
let :params do
let :facts do
{
:lsbdistid => 'Debian',
- :osfamily => 'Debian'
+ :osfamily => 'Debian',
+ :puppetversion => Puppet.version,
}
end