diff options
-rw-r--r-- | lib/puppet/statechange.rb | 12 | ||||
-rw-r--r-- | lib/puppet/type.rb | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/puppet/statechange.rb b/lib/puppet/statechange.rb index 081ef395c..8bf77ff52 100644 --- a/lib/puppet/statechange.rb +++ b/lib/puppet/statechange.rb @@ -136,8 +136,16 @@ module Puppet #--------------------------------------------------------------- def to_s - return "%s: %s changed %s to %s" % - [@state.parent, @state.name, @state.is_to_s, @state.should_to_s] + if @state.is == :notfound + return "%s: defined '%s' as '%s'" % + [@state.parent, @state.name, @state.should_to_s] + elsif @state.should == :notfound + return "%s: undefined %s from '%s'" % + [@state.parent, @state.name, @state.is_to_s] + else + return "%s: %s changed '%s' to '%s'" % + [@state.parent, @state.name, @state.is_to_s, @state.should_to_s] + end end #--------------------------------------------------------------- end diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index 4f957a74e..4826686b4 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -688,7 +688,7 @@ class Type < Puppet::Element hash[self.namevar] || hash[self.namevar.to_s] # if the object already exists if retobj = self[name] - retobj.merge(self) + retobj.merge(hash) return retobj else |