When I changed the alias property of hosts to host_aliases I missed
these changes in the parsed file provider.

Signed-off-by: Markus Roberts <[email protected]>
---
 lib/puppet/provider/host/parsed.rb |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/puppet/provider/host/parsed.rb 
b/lib/puppet/provider/host/parsed.rb
index e638138..56caf8b 100644
--- a/lib/puppet/provider/host/parsed.rb
+++ b/lib/puppet/provider/host/parsed.rb
@@ -17,8 +17,8 @@ Puppet::Type.type(:host).provide(:parsed,
     text_line :comment, :match => /^#/
     text_line :blank, :match => /^\s*$/
 
-    record_line :parsed, :fields => %w{ip name alias},
-        :optional => %w{alias},
+    record_line :parsed, :fields => %w{ip name host_aliases},
+        :optional => %w{host_aliases},
         :rts => true do |line|
         hash = {}
         if line.sub!(/^(\S+)\s+(\S+)\s*/, '')
@@ -30,7 +30,7 @@ Puppet::Type.type(:host).provide(:parsed,
                 line.sub!(/^([^#]+)\s*/) do |value|
                     aliases = $1
                     unless aliases =~ /^\s*$/
-                        hash[:alias] = aliases.split(/\s+/)
+                        hash[:host_aliases] = aliases.split(/\s+/)
                     end
 
                     ""
@@ -40,8 +40,8 @@ Puppet::Type.type(:host).provide(:parsed,
             raise Puppet::Error, "Could not match '%s'" % line
         end
 
-        if hash[:alias] == ""
-            hash.delete(:alias)
+        if hash[:host_aliases] == ""
+            hash.delete(:host_aliases)
         end
 
         return hash
@@ -58,11 +58,11 @@ Puppet::Type.type(:host).provide(:parsed,
 
         str = "%s\t%s" % [hash[:ip], hash[:name]]
 
-        if hash.include? :alias
+        if hash.include? :host_aliases
             if hash[:alias].is_a? Array
-                str += "\t%s" % hash[:alias].join("\t")
+                str += "\t%s" % hash[:host_aliases].join("\t")
             else
-                raise ArgumentError, "Aliases must be specified as an array"
+                raise ArgumentError, "Host aliases must be specified as an 
array"
             end
         end
 
-- 
1.6.4

--

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