Issue #12337 has been updated by Daniel Pittman.

Status changed from Unreviewed to Needs Decision
Assignee set to Daniel Pittman

This is part of a related suite of problems, in which it is actually super-hard 
to resolve facts well in the current model.  This is not the first time that 
ordering and internal dependencies between facts have caused problems.

Ultimately, this needs a decision about the model: can we actually support 
interdependent facts at all, without going mad, or are we stuck forcing them to 
be unrelated to each other?
----------------------------------------
Bug #12337: Can not use nest facts when writing custom facts
https://projects.puppetlabs.com/issues/12337

Author: Nan Liu
Status: Needs Decision
Priority: Normal
Assignee: Daniel Pittman
Category: library
Target version: 
Keywords: 
Branch: 
Affected Facter version: 


This not only returns the wrong value, it also breaks osfamily:

    Facter.add('my_osfamily')
      setcode do
        Facter.value(:osfamily)
      end
    end

It's as if operatingsystem doesn't get loaded before it obtaining osfamily. 
It's necessary for force loading before using a fact that depends on another 
fact to get the correct values:

    Facter.collection.loader.load(:operatingsystem)
    Facter.collection.loader.load(:osfamily)


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to