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, but I also tried 
operationsystem, as mentioned here. I configured weights from -100 to 
9999999... just to be sure ;)
Julien wrote , it worked great, so am I doing something wrong?

I'm running puppet 3.1 (master and client)
A basic testing rule I use for debugging purpose is:

exportfile = '/etc/facter_export'
if File.exists?(exportfile) then
    File.open(exportfile, 'r').each do |line|
        unless line =~ /^\s*#/ then
            tokens = line.split('=')
            Facter.add(tokens[0].strip) do
                has_weight 100
                setcode do
                    tokens[1].strip
                end
            end
        end
    end
end

This way it is easy to try overriding build in facts as well as 
self-written ones. 

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to