Describe the Bug
Legacy facts present in the confine statement for custom facts. These are not compatible with Puppet 8 default setting to disable legacy fact collection.
|
Facter.add('choco_install_path') do |
|
confine osfamily: :windows |
|
setcode do |
|
PuppetX::Chocolatey::ChocolateyInstall.install_path || 'C:\ProgramData\chocolatey' |
|
end |
|
end |
|
Facter.add('choco_temp_dir') do |
|
confine osfamily: :windows |
|
setcode do |
|
PuppetX::Chocolatey::ChocolateyInstall.temp_dir || ENV.fetch('TEMP', nil) |
|
end |
|
end |
|
Facter.add('chocolateyversion') do |
|
confine osfamily: :windows |
|
setcode do |
|
choco_ver = PuppetX::Chocolatey::ChocolateyVersion.version || '0' |
|
choco_ver.to_s |
|
end |
|
end |
Expected Behavior
Please update to the structured fact 'os.family' for Puppet 7 and 8 compatibility.
confine 'os.family': :windows
Should you wish to maintain backwards compatibility with Puppet 6, consider using a Ruby block.
confine 'os' do | os |
os['family'] == 'windows'
end
Additional Context
Reference:
Describe the Bug
Legacy facts present in the confine statement for custom facts. These are not compatible with Puppet 8 default setting to disable legacy fact collection.
puppetlabs-chocolatey/lib/facter/choco_install_path.rb
Lines 6 to 11 in f702de0
puppetlabs-chocolatey/lib/facter/choco_temp_dir.rb
Lines 6 to 11 in f702de0
puppetlabs-chocolatey/lib/facter/chocolateyversion.rb
Lines 6 to 12 in f702de0
Expected Behavior
Please update to the structured fact 'os.family' for Puppet 7 and 8 compatibility.
Should you wish to maintain backwards compatibility with Puppet 6, consider using a Ruby block.
Additional Context
Reference: