From afa92142f3638fe8b520dc3e474f87dc201b17ab Mon Sep 17 00:00:00 2001 From: Conor Horan-Kates Date: Thu, 3 Sep 2015 10:46:57 -0700 Subject: [PATCH 1/2] adding did_exec_fire? method --- lib/rouster.rb | 2 +- lib/rouster/puppet.rb | 25 +++++++- .../resources/puppet_run_with_failed_exec | 59 ++++++++++++++++++ .../resources/puppet_run_with_successful_exec | 61 +++++++++++++++++++ test/unit/puppet/test_puppet_parsing.rb | 44 +++++++++++++ 5 files changed, 188 insertions(+), 3 deletions(-) create mode 100644 test/unit/puppet/resources/puppet_run_with_failed_exec create mode 100644 test/unit/puppet/resources/puppet_run_with_successful_exec create mode 100644 test/unit/puppet/test_puppet_parsing.rb diff --git a/lib/rouster.rb b/lib/rouster.rb index 31171fa..8b5fb1c 100644 --- a/lib/rouster.rb +++ b/lib/rouster.rb @@ -25,7 +25,7 @@ class PassthroughError < StandardError; end # thrown by anything Passthrough class SSHConnectionError < StandardError; end # thrown by available_via_ssh() -- and potentially _run() attr_accessor :facts - attr_reader :cache, :cache_timeout, :deltas, :exitcode, :logger, :name, :output, :passthrough, :retries, :sshkey, :unittest, :vagrantbinary, :vagrantfile + attr_reader :cache, :cache_timeout, :deltas, :exitcode, :last_puppet_run, :logger, :name, :output, :passthrough, :retries, :sshkey, :unittest, :vagrantbinary, :vagrantfile ## # initialize - object instantiation diff --git a/lib/rouster/puppet.rb b/lib/rouster/puppet.rb index fb559c6..15f4e19 100644 --- a/lib/rouster/puppet.rb +++ b/lib/rouster/puppet.rb @@ -46,6 +46,27 @@ def facter(cache=true, custom_facts=true) res end + ## + # did_exec_fire? + # + # given the name of an Exec resource, parse the output from the most recent puppet run + # and return true/false based on whether the exec in question was fired + def did_exec_fire?(resource_name, puppet_run = self.last_puppet_run) + # Notice: /Stage[main]//Exec[foo]/returns: executed successfully + # Error: /Stage[main]//Exec[bar]/returns: change from notrun to 0 failed: Could not find command '/bin/bar' + matchers = [ + 'Notice: /Stage\[.*\]//Exec\[%s\]/returns: executed successfully', + 'Error: /Stage\[.*\]//Exec\[%s\]/returns: change from notrun to 0 failed' + ] + + matchers.each do |m| + matcher = sprintf(m, resource_name) + return true if puppet_run.match(matcher) + end + + false + end + ## # get_catalog # @@ -468,7 +489,7 @@ def run_puppet(mode='master', passed_opts={}) cmd << sprintf(' %s', opts[:additional_options]) unless opts[:additional_options].nil? cmd << sprintf(' %s', file) - self.run(cmd, opts[:expected_exitcode]) + self.last_puppet_run = self.run(cmd, opts[:expected_exitcode]) end end @@ -490,7 +511,7 @@ def run_puppet(mode='master', passed_opts={}) cmd << sprintf(' %s', opts[:additional_options]) unless opts[:additional_options].nil? cmd << sprintf(' %s', m) - self.run(cmd, opts[:expected_exitcode]) + self.last_puppet_run = self.run(cmd, opts[:expected_exitcode]) end end diff --git a/test/unit/puppet/resources/puppet_run_with_failed_exec b/test/unit/puppet/resources/puppet_run_with_failed_exec new file mode 100644 index 0000000..4bc8965 --- /dev/null +++ b/test/unit/puppet/resources/puppet_run_with_failed_exec @@ -0,0 +1,59 @@ +Debug: Creating default schedules +Debug: Using settings: adding file resource 'clientyamldir': 'File[/home/vagrant/.puppet/var/client_yaml]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/var/client_yaml"}' +Debug: Using settings: adding file resource 'lastrunreport': 'File[/home/vagrant/.puppet/var/state/last_run_report.yaml]{:loglevel=>:debug, :links=>:follow, :ensure=>:file, :backup=>false, :mode=>"640", :path=>"/home/vagrant/.puppet/var/state/last_run_report.yaml"}' +Debug: Using settings: adding file resource 'confdir': 'File[/home/vagrant/.puppet]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet"}' +Debug: Using settings: adding file resource 'ssldir': 'File[/home/vagrant/.puppet/ssl]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"771", :path=>"/home/vagrant/.puppet/ssl"}' +Debug: Using settings: adding file resource 'privatekeydir': 'File[/home/vagrant/.puppet/ssl/private_keys]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/ssl/private_keys"}' +Debug: Using settings: adding file resource 'client_datadir': 'File[/home/vagrant/.puppet/var/client_data]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/var/client_data"}' +Debug: Using settings: adding file resource 'statedir': 'File[/home/vagrant/.puppet/var/state]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"1755", :path=>"/home/vagrant/.puppet/var/state"}' +Debug: Using settings: adding file resource 'vardir': 'File[/home/vagrant/.puppet/var]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/var"}' +Debug: Using settings: adding file resource 'libdir': 'File[/home/vagrant/.puppet/var/lib]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/var/lib"}' +Debug: Using settings: adding file resource 'publickeydir': 'File[/home/vagrant/.puppet/ssl/public_keys]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/ssl/public_keys"}' +Debug: Using settings: adding file resource 'rundir': 'File[/home/vagrant/.puppet/var/run]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"755", :path=>"/home/vagrant/.puppet/var/run"}' +Debug: Using settings: adding file resource 'privatedir': 'File[/home/vagrant/.puppet/ssl/private]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/ssl/private"}' +Debug: Using settings: adding file resource 'statefile': 'File[/home/vagrant/.puppet/var/state/state.yaml]{:loglevel=>:debug, :links=>:follow, :ensure=>:file, :backup=>false, :mode=>"660", :path=>"/home/vagrant/.puppet/var/state/state.yaml"}' +Debug: Using settings: adding file resource 'clientbucketdir': 'File[/home/vagrant/.puppet/var/clientbucket]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/var/clientbucket"}' +Debug: Using settings: adding file resource 'lastrunfile': 'File[/home/vagrant/.puppet/var/state/last_run_summary.yaml]{:loglevel=>:debug, :links=>:follow, :ensure=>:file, :backup=>false, :mode=>"644", :path=>"/home/vagrant/.puppet/var/state/last_run_summary.yaml"}' +Debug: Using settings: adding file resource 'logdir': 'File[/home/vagrant/.puppet/var/log]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/var/log"}' +Debug: Using settings: adding file resource 'certdir': 'File[/home/vagrant/.puppet/ssl/certs]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/ssl/certs"}' +Debug: Using settings: adding file resource 'graphdir': 'File[/home/vagrant/.puppet/var/state/graphs]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/var/state/graphs"}' +Debug: Using settings: adding file resource 'requestdir': 'File[/home/vagrant/.puppet/ssl/certificate_requests]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/ssl/certificate_requests"}' +Debug: /File[/home/vagrant/.puppet/var]: Autorequiring File[/home/vagrant/.puppet] +Debug: /File[/home/vagrant/.puppet/ssl/certs]: Autorequiring File[/home/vagrant/.puppet/ssl] +Debug: /File[/home/vagrant/.puppet/var/state]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/var/state/graphs]: Autorequiring File[/home/vagrant/.puppet/var/state] +Debug: /File[/home/vagrant/.puppet/var/state/last_run_report.yaml]: Autorequiring File[/home/vagrant/.puppet/var/state] +Debug: /File[/home/vagrant/.puppet/var/run]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/ssl/certificate_requests]: Autorequiring File[/home/vagrant/.puppet/ssl] +Debug: /File[/home/vagrant/.puppet/ssl]: Autorequiring File[/home/vagrant/.puppet] +Debug: /File[/home/vagrant/.puppet/var/state/last_run_summary.yaml]: Autorequiring File[/home/vagrant/.puppet/var/state] +Debug: /File[/home/vagrant/.puppet/ssl/private_keys]: Autorequiring File[/home/vagrant/.puppet/ssl] +Debug: /File[/home/vagrant/.puppet/var/client_data]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/var/client_yaml]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/var/clientbucket]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/ssl/private]: Autorequiring File[/home/vagrant/.puppet/ssl] +Debug: /File[/home/vagrant/.puppet/ssl/public_keys]: Autorequiring File[/home/vagrant/.puppet/ssl] +Debug: /File[/home/vagrant/.puppet/var/log]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/var/state/state.yaml]: Autorequiring File[/home/vagrant/.puppet/var/state] +Debug: /File[/home/vagrant/.puppet/var/lib]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: Finishing transaction 69859761088440 +Debug: Loaded state in 0.00 seconds +Debug: Loaded state in 0.00 seconds +Info: Applying configuration version '1427151219' +Debug: /Schedule[daily]: Skipping device resources because running on a host +Debug: /Schedule[monthly]: Skipping device resources because running on a host +Debug: /Schedule[hourly]: Skipping device resources because running on a host +Error: Could not find command '/bin/bar' +Error: /Stage[main]//Exec[bar]/returns: change from notrun to 0 failed: Could not find command '/bin/bar' +Debug: /Schedule[never]: Skipping device resources because running on a host +Debug: /Schedule[weekly]: Skipping device resources because running on a host +Debug: /Schedule[puppet]: Skipping device resources because running on a host +Debug: Class[Main]: The container Stage[main] will propagate my refresh event +Debug: Finishing transaction 69859760392420 +Debug: Storing state +Debug: Stored state in 0.01 seconds +Notice: Finished catalog run in 0.10 seconds +Debug: Using settings: adding file resource 'rrddir': 'File[/home/vagrant/.puppet/var/rrd]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/var/rrd"}' +Debug: Finishing transaction 69859760156920 +Debug: Received report to process from centos6.internal.salesforce.com +Debug: Processing report from centos6.internal.salesforce.com with processor Puppet::Reports::Store diff --git a/test/unit/puppet/resources/puppet_run_with_successful_exec b/test/unit/puppet/resources/puppet_run_with_successful_exec new file mode 100644 index 0000000..837b436 --- /dev/null +++ b/test/unit/puppet/resources/puppet_run_with_successful_exec @@ -0,0 +1,61 @@ +Debug: Creating default schedules +Debug: Using settings: adding file resource 'clientyamldir': 'File[/home/vagrant/.puppet/var/client_yaml]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/var/client_yaml"}' +Debug: Using settings: adding file resource 'lastrunreport': 'File[/home/vagrant/.puppet/var/state/last_run_report.yaml]{:loglevel=>:debug, :links=>:follow, :ensure=>:file, :backup=>false, :mode=>"640", :path=>"/home/vagrant/.puppet/var/state/last_run_report.yaml"}' +Debug: Using settings: adding file resource 'confdir': 'File[/home/vagrant/.puppet]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet"}' +Debug: Using settings: adding file resource 'ssldir': 'File[/home/vagrant/.puppet/ssl]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"771", :path=>"/home/vagrant/.puppet/ssl"}' +Debug: Using settings: adding file resource 'privatekeydir': 'File[/home/vagrant/.puppet/ssl/private_keys]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/ssl/private_keys"}' +Debug: Using settings: adding file resource 'client_datadir': 'File[/home/vagrant/.puppet/var/client_data]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/var/client_data"}' +Debug: Using settings: adding file resource 'statedir': 'File[/home/vagrant/.puppet/var/state]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"1755", :path=>"/home/vagrant/.puppet/var/state"}' +Debug: Using settings: adding file resource 'vardir': 'File[/home/vagrant/.puppet/var]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/var"}' +Debug: Using settings: adding file resource 'libdir': 'File[/home/vagrant/.puppet/var/lib]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/var/lib"}' +Debug: Using settings: adding file resource 'publickeydir': 'File[/home/vagrant/.puppet/ssl/public_keys]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/ssl/public_keys"}' +Debug: Using settings: adding file resource 'rundir': 'File[/home/vagrant/.puppet/var/run]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"755", :path=>"/home/vagrant/.puppet/var/run"}' +Debug: Using settings: adding file resource 'privatedir': 'File[/home/vagrant/.puppet/ssl/private]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/ssl/private"}' +Debug: Using settings: adding file resource 'statefile': 'File[/home/vagrant/.puppet/var/state/state.yaml]{:loglevel=>:debug, :links=>:follow, :ensure=>:file, :backup=>false, :mode=>"660", :path=>"/home/vagrant/.puppet/var/state/state.yaml"}' +Debug: Using settings: adding file resource 'clientbucketdir': 'File[/home/vagrant/.puppet/var/clientbucket]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/var/clientbucket"}' +Debug: Using settings: adding file resource 'lastrunfile': 'File[/home/vagrant/.puppet/var/state/last_run_summary.yaml]{:loglevel=>:debug, :links=>:follow, :ensure=>:file, :backup=>false, :mode=>"644", :path=>"/home/vagrant/.puppet/var/state/last_run_summary.yaml"}' +Debug: Using settings: adding file resource 'logdir': 'File[/home/vagrant/.puppet/var/log]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/var/log"}' +Debug: Using settings: adding file resource 'certdir': 'File[/home/vagrant/.puppet/ssl/certs]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/ssl/certs"}' +Debug: Using settings: adding file resource 'graphdir': 'File[/home/vagrant/.puppet/var/state/graphs]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/var/state/graphs"}' +Debug: Using settings: adding file resource 'requestdir': 'File[/home/vagrant/.puppet/ssl/certificate_requests]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/home/vagrant/.puppet/ssl/certificate_requests"}' +Debug: /File[/home/vagrant/.puppet/var]: Autorequiring File[/home/vagrant/.puppet] +Debug: /File[/home/vagrant/.puppet/ssl/certs]: Autorequiring File[/home/vagrant/.puppet/ssl] +Debug: /File[/home/vagrant/.puppet/var/state]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/var/state/graphs]: Autorequiring File[/home/vagrant/.puppet/var/state] +Debug: /File[/home/vagrant/.puppet/var/state/last_run_report.yaml]: Autorequiring File[/home/vagrant/.puppet/var/state] +Debug: /File[/home/vagrant/.puppet/var/run]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/ssl/certificate_requests]: Autorequiring File[/home/vagrant/.puppet/ssl] +Debug: /File[/home/vagrant/.puppet/ssl]: Autorequiring File[/home/vagrant/.puppet] +Debug: /File[/home/vagrant/.puppet/var/state/last_run_summary.yaml]: Autorequiring File[/home/vagrant/.puppet/var/state] +Debug: /File[/home/vagrant/.puppet/ssl/private_keys]: Autorequiring File[/home/vagrant/.puppet/ssl] +Debug: /File[/home/vagrant/.puppet/var/client_data]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/var/client_yaml]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/var/clientbucket]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/ssl/private]: Autorequiring File[/home/vagrant/.puppet/ssl] +Debug: /File[/home/vagrant/.puppet/ssl/public_keys]: Autorequiring File[/home/vagrant/.puppet/ssl] +Debug: /File[/home/vagrant/.puppet/var/log]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: /File[/home/vagrant/.puppet/var/state/state.yaml]: Autorequiring File[/home/vagrant/.puppet/var/state] +Debug: /File[/home/vagrant/.puppet/var/lib]: Autorequiring File[/home/vagrant/.puppet/var] +Debug: Finishing transaction 69859761088440 +Debug: Loaded state in 0.00 seconds +Debug: Loaded state in 0.00 seconds +Info: Applying configuration version '1427151219' +Debug: /Schedule[daily]: Skipping device resources because running on a host +Debug: /Schedule[monthly]: Skipping device resources because running on a host +Debug: /Schedule[hourly]: Skipping device resources because running on a host +Debug: Exec[foo](provider=posix): Executing '/bin/echo foo' +Debug: Executing '/bin/echo foo' +Notice: /Stage[main]//Exec[foo]/returns: executed successfully +Debug: /Stage[main]//Exec[foo]: The container Class[Main] will propagate my refresh event +Debug: /Schedule[never]: Skipping device resources because running on a host +Debug: /Schedule[weekly]: Skipping device resources because running on a host +Debug: /Schedule[puppet]: Skipping device resources because running on a host +Debug: Class[Main]: The container Stage[main] will propagate my refresh event +Debug: Finishing transaction 69859760392420 +Debug: Storing state +Debug: Stored state in 0.01 seconds +Notice: Finished catalog run in 0.10 seconds +Debug: Using settings: adding file resource 'rrddir': 'File[/home/vagrant/.puppet/var/rrd]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :mode=>"750", :path=>"/home/vagrant/.puppet/var/rrd"}' +Debug: Finishing transaction 69859760156920 +Debug: Received report to process from centos6.internal.salesforce.com +Debug: Processing report from centos6.internal.salesforce.com with processor Puppet::Reports::Store diff --git a/test/unit/puppet/test_puppet_parsing.rb b/test/unit/puppet/test_puppet_parsing.rb new file mode 100644 index 0000000..e26ac89 --- /dev/null +++ b/test/unit/puppet/test_puppet_parsing.rb @@ -0,0 +1,44 @@ +require sprintf('%s/../../../path_helper', File.dirname(File.expand_path(__FILE__))) + +require 'rouster' +require 'rouster/puppet' +require 'test/unit' + +# this is a unit test, no need for a real Rouster VM + +class TestGetPuppetStar < Test::Unit::TestCase + + def setup + assert_nothing_raised do + @app = Rouster.new(:name => 'app', :unittest => true) + end + + # expose private methods + Rouster.send(:public, *Rouster.protected_instance_methods) + end + + def test_with_successful_exec + title = 'foo' + input = File.read(sprintf('%s/../../../test/unit/puppet/resources/puppet_run_with_successful_exec', File.dirname(File.expand_path(__FILE__)))) + + + assert(@app.did_exec_fire?(title, input)) + end + + def test_with_failed_exec + title = 'bar' + input = File.read(sprintf('%s/../../../test/unit/puppet/resources/puppet_run_with_failed_exec', File.dirname(File.expand_path(__FILE__)))) + + assert(@app.did_exec_fire?(title, input)) + end + + def test_looking_for_nonexistent_exec + title = 'fizzbang' + input = File.read(sprintf('%s/../../../test/unit/puppet/resources/puppet_run_with_successful_exec', File.dirname(File.expand_path(__FILE__)))) + + assert_false(@app.did_exec_fire?(title, input)) + end + + +end + From 599ec6b55413f9a80e3ee1e050518aefbb248681 Mon Sep 17 00:00:00 2001 From: Conor Horan-Kates Date: Tue, 23 Aug 2016 14:31:55 -0700 Subject: [PATCH 2/2] fixing a minor access bug found by tests --- lib/rouster.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rouster.rb b/lib/rouster.rb index ad1b0d6..5055baa 100644 --- a/lib/rouster.rb +++ b/lib/rouster.rb @@ -24,8 +24,8 @@ class RemoteExecutionError < StandardError; end # thrown by run() class PassthroughError < StandardError; end # thrown by anything Passthrough related (mostly vagrant.rb) class SSHConnectionError < StandardError; end # thrown by available_via_ssh() -- and potentially _run() - attr_accessor :facts - attr_reader :cache, :cache_timeout, :deltas, :exitcode, :last_puppet_run, :logger, :name, :output, :passthrough, :retries, :sshkey, :unittest, :vagrantbinary, :vagrantfile + attr_accessor :facts, :last_puppet_run + attr_reader :cache, :cache_timeout, :deltas, :exitcode, :logger, :name, :output, :passthrough, :retries, :sshkey, :unittest, :vagrantbinary, :vagrantfile ## # initialize - object instantiation