Just for the record, this is the code I'm using:
Facter.add(:operatingsystem) do
> confine :kernel => [ 'Linux' ]
> has_weight 100
> setcode do
> if FileTest.exists?("/usr/bin/pveversion") then
> "Proxmox"
> end
> end
> end
>
> Facter.add(:operatingsystemrelease) do
> con
On 03/23/2013 07:42 PM, Heiko Finzel wrote:
EDIT: In fact it does work.
I found out, because I still had some keys (e.g. hostname) in my
debugging config. And these values were used by puppet correctly.
However a local "facter -p" won't show these values. In this case the
original hostname will b
EDIT: In fact it does work.
I found out, because I still had some keys (e.g. hostname) in my debugging
config. And these values were used by puppet correctly.
However a local "facter -p" won't show these values. In this case the
original hostname will be used.
--
You received this message becau
Hi I'm having a similar issue.
I found the solution Hailee posted here in the official documentation and
gave it a try.
The weight seems to work great as long as it concerns my own facts. But as
it seems it won't work for build in types.
In my special case I want to override the hostname fact, bu
Hi Julien,
When writing custom facts, you can specify precedence by setting a weight
for your fact resolution.
By default, the weight of a fact resolution is the number of confines it
has. Since your custom fact resolution has no confine statements, and the
default operatingsystem resolution
I tried this method too:
http://www.puppetcookbook.com/posts/override-a-facter-fact.html
It works with puppet 2.7, but not with 2.6.2
[16:41:15 #168 root@:~$ ] FACTER_operatingsystem=plop puppet -e 'notify {
> "We are running on $::operatingsystem": }'
> notice: We are running on Debian
> noti