[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

Markus Roberts Markus at reality.com
Wed Jul 14 10:36:02 UTC 2010


The following commit has been merged in the upstream branch:
commit ebd03113d2c4024a7db603e73ca9f5dab34034c8
Author: Jesse Wolfe <jes5199 at gmail.com>
Date:   Wed Jun 30 12:45:56 2010 -0700

    [#3172] puppet kick can take hostnames as bare arguments

diff --git a/lib/puppet/application/kick.rb b/lib/puppet/application/kick.rb
index 0dd4d39..3d0d101 100644
--- a/lib/puppet/application/kick.rb
+++ b/lib/puppet/application/kick.rb
@@ -38,6 +38,7 @@ class Puppet::Application::Kick < Puppet::Application
     end
 
     def run_command
+        @hosts += command_line.args
         options[:test] ? test : main
     end
 
@@ -143,6 +144,13 @@ class Puppet::Application::Kick < Puppet::Application
             exit(12)
         end
     end
+    
+    def initialize
+        super
+        @hosts = []
+        @classes = []
+        @tags = []
+    end
 
     def preinit
         [:INT, :TERM].each do |signal|
@@ -156,10 +164,6 @@ class Puppet::Application::Kick < Puppet::Application
         options[:fqdn] = true
         options[:ignoreschedules] = false
         options[:foreground] = false
-
-        @hosts = []
-        @classes = []
-        @tags = []
     end
 
     def setup
diff --git a/sbin/puppetrun b/sbin/puppetrun
index d2a1284..169513d 100755
--- a/sbin/puppetrun
+++ b/sbin/puppetrun
@@ -9,7 +9,7 @@
 #
 #   puppet kick [-a|--all] [-c|--class <class>] [-d|--debug] [-f|--foreground]
 #       [-h|--help] [--host <host>] [--no-fqdn] [--ignoreschedules]
-#       [-t|--tag <tag>] [--test] [-p|--ping]
+#       [-t|--tag <tag>] [--test] [-p|--ping] <host> [<host> [...]]
 #
 # = Description
 #
@@ -114,7 +114,7 @@
 #
 # = Example
 #
-#   sudo puppet kick -p 10 --host host1 --host host2 -t remotefile -t webserver
+#   sudo puppet kick -p 10 -t remotefile -t webserver host1 host2
 #
 # = Author
 #
diff --git a/spec/unit/application/kick_spec.rb b/spec/unit/application/kick_spec.rb
index 58e71b2..40bc097 100755
--- a/spec/unit/application/kick_spec.rb
+++ b/spec/unit/application/kick_spec.rb
@@ -2,7 +2,6 @@
 
 require File.dirname(__FILE__) + '/../../spec_helper'
 
-require 'puppet/util/ldap/connection'
 require 'puppet/application/kick'
 
 describe Puppet::Application::Kick do
@@ -10,6 +9,7 @@ describe Puppet::Application::Kick do
     confine "Kick's eventloops can only start on POSIX" => Puppet.features.posix?
 
     before :each do
+        require 'puppet/util/ldap/connection'
         Puppet::Util::Ldap::Connection.stubs(:new).returns(stub_everything)
         @kick = Puppet::Application[:kick]
         Puppet::Util::Log.stubs(:newdestination)
@@ -230,7 +230,7 @@ describe Puppet::Application::Kick do
                 @kick.stubs(:print)
                 @kick.stubs(:exit)
                 @kick.preinit
-                @kick.parse_options
+                @kick.stubs(:parse_options)
                 @kick.setup
                 $stderr.stubs(:puts)
             end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list