Reputation: 3710
I'm still quite new to puppet however I'm writing some deployments with it.
I came a across an issue where I couldn't get symlinks right because for some reason I was getting a mismatch between existing system folders and puppet ${architecture} variable.
I need the following code to work as following:
On Ubuntu 12.04 x86_64 I sould get a link from /usr/lib/libz.so
to /usr/lib/x86_64-linux-gnu/libz.so
However, I'm getting insted to /usr/lib/amd64-linux-gnu/libz.so
which doesn't exist creating than a broken link.
file {"/usr/lib/libz.so":
ensure => link,
target => "/usr/lib/${architecture}-linux-gnu/libz.so",
}
Puppet uses Facter to get system facts, and running facter on my command line I get the following:
root@somehost:/root# facter
architecture => amd64
facterversion => 1.6.5
hardwareisa => x86_64
(....)
Running lscpu
I get:
root@tsomehost:/root# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
(....)
My question is, where does Facter gets its facts from?
Upvotes: 0
Views: 2343
Reputation: 3205
The Facter documentation now includes docs about how core facts are resolved.
uname -m
and then on Debian converts x86_64
to amd64
uname -p
$hardwaremodel
might be what you want here, however I think it will return x86_64 if you used a 64-bit kernel with a 32-bit userland, which probably isn't correct for your use-case.
Upvotes: 2
Reputation: 12913
What is your version of Puppet and Facter?
Maybe you have an < 1.6.5 Facter version and thus have this bug: http://projects.puppetlabs.com/issues/11511
Try upgrading if you can.
Upvotes: 0