On 10/25/2010 2:28 AM, Nigel Kersten wrote:
I concur. I made the mistake of using booleans early on, and it would
have been useful to have this made obvious before I dug a larger hole
for myself.
+1.
Best Regards, David
--
dasz.at OG Tel: +43 (0)664 2602670 Web:
Fix is_virtual fact to return strings rather than bools.
Wouldn't a better way to achieve this be this patch?
diff --git a/lib/facter/util/fact.rb b/lib/facter/util/fact.rb
index e78ed97..e01833b 100644
--- a/lib/facter/util/fact.rb
+++ b/lib/facter/util/fact.rb
@@ -77,6 +77,9 @@ class
On Sun, Oct 24, 2010 at 5:13 PM, Daniel Pittman dan...@rimspace.net wrote:
Markus Roberts mar...@puppetlabs.com writes:
Fix is_virtual fact to return strings rather than bools.
Wouldn't a better way to achieve this be this patch?
diff --git a/lib/facter/util/fact.rb
Paul Nasrat pnas...@gmail.com writes:
Fix is_virtual fact to return strings rather than bools.
Wouldn't a better way to achieve this be this patch?
diff --git a/lib/facter/util/fact.rb b/lib/facter/util/fact.rb
index e78ed97..e01833b 100644
--- a/lib/facter/util/fact.rb
+++
Fix is_virtual fact to return strings rather than bools.
Signed-off-by: Paul Nasrat pnas...@googlemail.com
---
lib/facter/virtual.rb |4 ++--
spec/unit/virtual.rb | 12 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/facter/virtual.rb
I'd suggest defining:
Virtual_systems = %w{ xenu openvzve vmware kvm vserver jail }
and then writing
setcode do
Virtual_systems.include?(Facter.value(:virtual)).to_s
end
or
setcode do
#{Virtual_systems.include? Facter.value(:virtual)}
end
instead of