Files
zulip/puppet/puppet-apt/lib/facter/apt_version.rb
Zev Benjamin dd678465ae [manual] Move puppet modules to the top level
The new puppet.conf file has to be moved into place manually.

(imported from commit 253d9a95386dae8c803a998ce2dc7e8be40c880a)
2013-10-30 15:42:26 -04:00

11 lines
163 B
Ruby

output = %x{apt-get -v 2>&1}
if $?.exitstatus and output.match(/apt (\d+\.\d+\.\d+).*/)
Facter.add("apt_version") do
setcode do
$1
end
end
end