diff options
author | Luke Kanies <luke@madstop.com> | 2009-05-27 09:57:57 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-05-27 10:19:50 -0500 |
commit | b83b159b69e1952c20f23629fc1255069ad5abb0 (patch) | |
tree | 71880e3018b6d40137038bd7b37604a827f9c67e | |
parent | 3d2189f3b6173171b37eaf814fdda2756c5a348a (diff) | |
download | puppet-b83b159b69e1952c20f23629fc1255069ad5abb0.tar.gz puppet-b83b159b69e1952c20f23629fc1255069ad5abb0.tar.xz puppet-b83b159b69e1952c20f23629fc1255069ad5abb0.zip |
Fixing #2243 - puppetrun works again
The problem was that some defaults were nil but had
to be 'false', because xmlrpc can't serialize 'nil'
as an rpc argument.
Signed-off-by: Luke Kanies <luke@madstop.com>
-rw-r--r-- | lib/puppet/application/puppetrun.rb | 5 | ||||
-rwxr-xr-x | spec/unit/application/puppetrun.rb | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/lib/puppet/application/puppetrun.rb b/lib/puppet/application/puppetrun.rb index 59ace826a..2dbd803fa 100644 --- a/lib/puppet/application/puppetrun.rb +++ b/lib/puppet/application/puppetrun.rb @@ -128,8 +128,9 @@ Puppet::Application.new(:puppetrun) do print "Triggering %s\n" % host begin - result = client.run(@tags, options[:ignoreschedules], options[:foreground]) + result = client.run(@tags, options[:ignoreschedules] || false, options[:foreground] || false) rescue => detail + puts detail.backtrace if Puppet[:trace] $stderr.puts "Host %s failed: %s\n" % [host, detail] exit(2) end @@ -155,6 +156,8 @@ Puppet::Application.new(:puppetrun) do options[:parallel] = 1 options[:verbose] = true options[:fqdn] = true + options[:ignoreschedules] = false + options[:foreground] = false @hosts = [] @classes = [] diff --git a/spec/unit/application/puppetrun.rb b/spec/unit/application/puppetrun.rb index 2a8ccb84a..d44b406e9 100755 --- a/spec/unit/application/puppetrun.rb +++ b/spec/unit/application/puppetrun.rb @@ -57,6 +57,18 @@ describe "puppetrun" do @puppetrun.options[:fqdn].should be_true end + + it "should set ignoreschedules to 'false'" do + @puppetrun.run_preinit + + @puppetrun.options[:ignoreschedules].should be_false + end + + it "should set foreground to 'false'" do + @puppetrun.run_preinit + + @puppetrun.options[:foreground].should be_false + end end describe "when applying options" do |