[Puppet Users] Re: How to override $::operatingsystem fact

2013-09-03 Thread SM
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

Re: [Puppet Users] Re: How to override $::operatingsystem fact

2013-03-24 Thread Jakov Sosic
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

[Puppet Users] Re: How to override $::operatingsystem fact

2013-03-23 Thread Heiko Finzel
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

[Puppet Users] Re: How to override $::operatingsystem fact

2013-03-19 Thread Heiko Finzel
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

[Puppet Users] Re: How to override $::operatingsystem fact

2012-07-17 Thread Hailee Kenney
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

[Puppet Users] Re: How to override $::operatingsystem fact

2012-07-17 Thread julien cosmao
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