Spencer Krum 1b617cee2c Add dpkg architeture facts
Dpkg and debian consider architecture separetly from what the hardware
is. These facts expose that to puppet.

Create both a normal fact and structured fact. The structured form could
be extended to add more dpkg properties.

Change-Id: I5b5d5bf6b8d19f4de3bc97d0240fdbda3e3a6a5d
2015-04-14 12:34:20 -07:00

20 lines
414 B
Ruby

Facter.add(:dpkg_arch) do
confine :kernel => :linux
confine :osfamily => :Debian
setcode do
arch = Facter::Util::Resolution.exec('dpkg --print-architecture')
arch
end
end
Facter.add(:dpkg) do
confine :kernel => :linux
confine :osfamily => :Debian
dpkg = {}
setcode do
arch = Facter::Util::Resolution.exec('dpkg --print-architecture')
dpkg['architecture'] = arch
dpkg
end
end