[英]Puppet and Facter default system facts
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. 我遇到了一个问题,我无法正确使用符号链接,因为出于某种原因,我在现有系统文件夹和puppet $ {architecture}变量之间出现了不匹配。
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. 在Ubuntu 12.04 x86_64上我可以从
/usr/lib/libz.so
获得一个链接到/usr/lib/x86_64-linux-gnu/libz.so
但是,我正在使用/usr/lib/amd64-linux-gnu/libz.so
创建不存在而不是断开的链接。
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: Puppet使用Facter获取系统事实,并在命令行上运行facter我得到以下内容:
root@somehost:/root# facter
architecture => amd64
facterversion => 1.6.5
hardwareisa => x86_64
(....)
Running lscpu
I get: 运行
lscpu
我得到:
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? 我的问题是,Facter从哪里获取事实?
The Facter documentation now includes docs about how core facts are resolved . Facter文档现在包含有关如何解决核心事实的文档。
uname -m
and then on Debian converts x86_64
to amd64
uname -m
然后在Debian上将x86_64
转换为amd64
uname -p
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. $hardwaremodel
可能就是你想要的,但是如果你使用的是32位用户空间的64位内核,我认为它会返回x86_64,这可能不适合你的用例。
What is your version of Puppet and Facter? 你的Puppet和Facter版本是什么?
Maybe you have an < 1.6.5 Facter version and thus have this bug: http://projects.puppetlabs.com/issues/11511 也许你有一个<1.6.5 Facter版本因此有这个bug: http : //projects.puppetlabs.com/issues/11511
Try upgrading if you can. 如果可以,请尝试升级。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.