diff options
| author | Brice Figureau <brice-puppet@daysofwonder.com> | 2010-11-13 11:41:18 +0100 |
|---|---|---|
| committer | Brice Figureau <brice-puppet@daysofwonder.com> | 2010-11-13 11:54:49 +0100 |
| commit | ccc944f21a259f0216b0bfd4873c98d89127a753 (patch) | |
| tree | 2a2b5f23883907c6ddb396914f404a7466b6b6b6 /lib/puppet/application | |
| parent | 8ab1aba853231a5e541346955dcd502a67992eb6 (diff) | |
| download | puppet-ccc944f21a259f0216b0bfd4873c98d89127a753.tar.gz puppet-ccc944f21a259f0216b0bfd4873c98d89127a753.tar.xz puppet-ccc944f21a259f0216b0bfd4873c98d89127a753.zip | |
Fix #4339 - Locally save the last report to $lastrunreport
Using the cache terminus system, when --report is on, we are now
caching the last report as a yaml file in the $lastrunreport file
(which by default is $statedir/last_run_report.yaml).
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/agent.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/application/apply.rb | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb index 2b75505fd..c5ad72068 100644 --- a/lib/puppet/application/agent.rb +++ b/lib/puppet/application/agent.rb @@ -229,6 +229,8 @@ class Puppet::Application::Agent < Puppet::Application Puppet::SSL::Host.ca_location = options[:fingerprint] ? :none : :remote Puppet::Transaction::Report.terminus_class = :rest + # we want the last report to be persisted locally + Puppet::Transaction::Report.cache_class = :yaml # Override the default; puppetd needs this, usually. # You can still override this on the command-line with, e.g., :compiler. diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb index ed1331d63..97de5e1ff 100644 --- a/lib/puppet/application/apply.rb +++ b/lib/puppet/application/apply.rb @@ -165,6 +165,9 @@ class Puppet::Application::Apply < Puppet::Application exit(1) end + # we want the last report to be persisted locally + Puppet::Transaction::Report.cache_class = :yaml + if options[:debug] Puppet::Util::Log.level = :debug elsif options[:verbose] |
