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
> confine :kernel => [ 'Linux' ]
> has_weight 100
> setcode do
> if FileTest.exists?("/usr/bin/pveversion") then
> Facter::Util::Resolution.exec("/usr/bin/pveversion")
> end
> end
> end
>
>
On Tuesday, July 17, 2012 9:30:15 AM UTC-4, julien cosmao wrote:
>
> Hi,
>
> I want to introduce "Proxmox" as new value in $::operatingsystem.
> "Proxmox" is based on Debian, so the normal value is currently "Debian".
>
> To change that, I just write a custom fact based on the facter fact
> "operatingsystem"
>
> Facter.add(:operatingsystem) do
>> ...
>> setcode do
>> ...
>> elsif FileTest.exists?("/usr/bin/pveversion")
>> "Proxmox"
>
>
> This method doesn't override the original fact.
>
> I've also tried to set $::operatingsystem = "Proxmox" directly in my node.
>
> What's the best way to do override an existing fact ?
>
> Regards,
>
> Julien
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.