summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/transaction/change.rb19
1 files changed, 5 insertions, 14 deletions
diff --git a/lib/puppet/transaction/change.rb b/lib/puppet/transaction/change.rb
index 396b9233e..e05c2592c 100644
--- a/lib/puppet/transaction/change.rb
+++ b/lib/puppet/transaction/change.rb
@@ -4,24 +4,15 @@ require 'puppet/transaction/event'
# Handle all of the work around performing an actual change,
# including calling 'sync' on the properties and producing events.
class Puppet::Transaction::Change
- attr_accessor :is, :should, :type, :path, :property, :changed, :proxy
-
- # The log file generated when this object was changed.
- attr_reader :report
+ attr_accessor :is, :should, :path, :property, :changed, :proxy
# Switch the goals of the property, thus running the change in reverse.
def backward
- @property.should = @is
- @is = @property.retrieve
+ @is, @should = @should, @is
+ @property.should = @should
- unless @property.insync?(@is)
- @property.info "Backing %s" % self
- return self.go
- else
- @property.debug "rollback is already in sync: %s vs. %s" %
- [@is, @property.should.inspect]
- return nil
- end
+ @property.info "Reversing %s" % self
+ return self.go
end
def changed?