From: jle64 Date: Thu, 27 Jul 2017 13:37:25 +0000 (+0200) Subject: Add apt_package_security_updates fact X-Git-Tag: 4.2.0~4^2~1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1953cc8daac9686bfb8c2db6c76646dffe728c30;p=puppet-modules%2Fpuppetlabs-apt.git Add apt_package_security_updates fact --- diff --git a/lib/facter/apt_updates.rb b/lib/facter/apt_updates.rb index b355f5b..e101dd7 100644 --- a/lib/facter/apt_updates.rb +++ b/lib/facter/apt_updates.rb @@ -42,6 +42,17 @@ Facter.add("apt_package_updates") do end end +Facter.add("apt_package_security_updates") do + confine :apt_has_updates => true + setcode do + if Facter.version < '2.0.0' + apt_package_updates[1].join(',') + else + apt_package_updates[1] + end + end +end + Facter.add("apt_updates") do confine :apt_has_updates => true setcode do