Issue #1365 has been updated by R.I. Pienaar aka Volcane.
Here's a much simpler diff that's not hacky at all I think,
I am just making it do a full parse of the facts once before doing the
previously existig logic, that sorts it all out.
<pre>
--- facter 2010-01-14 19:18:32.000000000 +0000
+++ facter.new 2010-01-14 19:18:51.000000000 +0000
@@ -135,7 +135,7 @@
}
-if names.empty?
- facts = Facter.to_hash
-else
+facts = Facter.to_hash
+
+unless names.empty?
facts = {}
names.each { |name|
</pre>
----------------------------------------
Bug #1365: Multiple facts defined in single file don't work when called
individually
http://projects.reductivelabs.com/issues/1365
Author: AJ Christensen
Status: Accepted
Priority: High
Assigned to: Paul Nasrat
Category: library
Target version: 1.6.0
Patch: None
Keywords: ipaddress
Branch:
Calling ipaddress_* directly from the CLI appears broken, in;
<pre>
a...@junglist (branch: master) ~/git/facter$ git log -n 1
commit b574c6a7f8c596e98bfab7ca48e172eb38fe23fa
Author: James Turnbull <[email protected]>
Date: Mon Jun 9 02:37:30 2008 +1000
Refactered ipmess.rb and util/ip.rb to support separate *BSD logic for *BSD
</pre>
<pre>
a...@junglist (branch: master) ~/git/facter$ facter|grep ipaddress
ipaddress => 123.100.70.1
ipaddress_eth0 => 123.100.70.1
ipaddress_eth0_0 => 123.100.70.2
ipaddress_eth0_1 => 123.100.70.3
ipaddress_eth0_2 => 123.100.70.4
ipaddress_eth0_3 => 123.100.70.5
a...@junglist (branch: master) ~/git/facter$ facter ipaddress
123.100.70.1
a...@junglist (branch: master) ~/git/facter$ facter ipaddress_eth0
a...@junglist (branch: master) ~/git/facter$ facter ipaddress_eth0_0
a...@junglist (branch: master) ~/git/facter$ facter ipaddress_eth0_1
a...@junglist (branch: master) ~/git/facter$ facter ipaddress_eth0_2
a...@junglist (branch: master) ~/git/facter$ facter ipaddress_eth0_3
</pre>
--
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://reductivelabs.com/redmine/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.
