Issue #7039 has been updated by Cody Robertson.
Following advice on the mailing list I tried to pinpoint where the issue was introduced using git bisect and it seems to be from: http://projects.puppetlabs.com/projects/facter/repository/show?rev=ebcb81be7408cfb8bd2bcb86f98ae6a98a6c70a5 which is related to http://projects.puppetlabs.com/issues/4558 <pre> ebcb81be7408cfb8bd2bcb86f98ae6a98a6c70a5 is the first bad commit commit ebcb81be7408cfb8bd2bcb86f98ae6a98a6c70a5 Author: Rein Henrichs <[email protected]> Date: Tue Aug 17 16:22:43 2010 -0700 [#4558] Refactor facter binary using optparse Simplify the binary by moving all application specific code into a new Facter::Application module. This module is then refactored to use OptionParser and to simplify invocation logic, while maintaining existing behavior. :040000 040000 d9adf5cdc984eac3f96599b59f58aa6a7a3bcb79 efb5a0cc53b086cebae242f25f7135e104cec050 M bin :040000 040000 17e67e707cd1f1e83b67a0aba8af1691ec6d4cb2 cc4de0f63b6a8fd5871b7d7bb326ec50e860dfe0 M lib </pre> ---------------------------------------- Bug #7039: Facter having issue handling multiple facts in a single file https://projects.puppetlabs.com/issues/7039 Author: Cody Robertson Status: Unreviewed Priority: Normal Assignee: Category: Target version: 1.5.9 Keywords: Branch: Affected Facter version: When declaring several facts in a single file Facter won't pick them up properly: <pre> # test_facts.rb Facter.add(:test_fact1) do setcode do "test fact 1" end end Facter.add(:test_fact2) do setcode do "test fact 2" end end </pre> <pre> root@slinky [~/facter]# facter --version 1.5.9 root@slinky [~/facter]# facter --puppet test_fact1 root@slinky [~/facter]# facter --puppet test_fact2 </pre> It works as expected with 1.5.8: <pre> root@slinky [~/facter]# facter --version 1.5.8 root@slinky [~/facter]# facter --puppet test_fact1 test fact 1 root@slinky [~/facter]# facter --puppet test_fact2 test fact 2 </pre> There appears to be some weird behavior across versions being reported on the mailing list: https://groups.google.com/forum/#!topic/puppet-users/6jZUQofQDxk . It appears to work in Puppet manifests just not when invoked locally on the machine. -- 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.
