The message was "host_aliases changed from 'absent' to ''". When reading
from
the hosts file, a host without aliases was considered to have "absent"
host_aliases. The host_aliases list is now considered to be present but
empty
if it is absent.

Signed-off-by: Nick Lewis <[email protected]>
---
 lib/puppet/provider/host/parsed.rb |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/puppet/provider/host/parsed.rb
b/lib/puppet/provider/host/parsed.rb
index f3e7630..b881b62 100644
--- a/lib/puppet/provider/host/parsed.rb
+++ b/lib/puppet/provider/host/parsed.rb
@@ -25,7 +25,9 @@ Puppet::Type.type(:host).provide(:parsed,
            hash[:ip] = $1
            hash[:name] = $2

-            unless line == ""
+            if line.empty?
+                hash[:host_aliases] = []
+            else
                line.sub!(/\s*/, '')
                line.sub!(/^([^#]+)\s*/) do |value|
                    aliases = $1
@@ -41,7 +43,7 @@ Puppet::Type.type(:host).provide(:parsed,
        end

        if hash[:host_aliases] == ""
-            hash.delete(:host_aliases)
+            hash[:host_aliases] = []
        end

        return hash
--
1.7.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" 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-dev?hl=en.

Reply via email to