Issue #3900 has been updated by Nigel Kersten.

Status changed from Accepted to Closed

Closing to help us manage the ticket debt we have, and because we're generally 
pushing people towards MCollective for orchestration rather than puppetrun.

If someone is actually going to write code to provide this, they can reopen it.
----------------------------------------
Feature #3900: puppetrun host:port
https://projects.puppetlabs.com/issues/3900

Author: Siim Põder
Status: Closed
Priority: Low
Assignee: 
Category: executables
Target version: 
Affected Puppet version: 0.25.4
Keywords: 
Branch: 


Sorry, if this feature is already present, I'm not using the latest puppet 
(using 0.25.4 from debian package)

I'd like to be able to specify a port per individual host when puppetrun'ing, 
something like this:

puppetrun --host server1:8139 --host server1:8151 --host server1:8152

The reason is that I have multiple chroots managed by puppet on one server and 
I would like to not assign an IP specially for puppet for each chroot (they are 
not accessed from the network directly).

Another possible way would be to run puppetrun multiple times:

puppetrun --puppetport 8139 --host server1
puppetrun --puppetport 8151 --host server1

But that would be considerably less convenient.
<pre>
I'd suggest a patch not unlike this:
--- a/puppetrun.rb      2010-05-27 20:57:55.000000000 +0000
+++ b/puppetrun.rb      2010-05-27 21:06:32.000000000 +0000
@@ -105,6 +105,17 @@
     end
 
     def run_for_host(host)
+        parts = host.split(":")
+        case parts.length
+            when 1 then
+                host = parts[0]
+                port = Puppet[:puppetport]
+            when 2 then
+                host, port = parts
+            else
+                $stderr.print "Could not parse host:port from %s\n" % host
+                next
+        end
         if options[:ping]
             out = %x{ping -c 1 #{host}}
             unless $? == 0
@@ -114,7 +125,7 @@
         end
         client = Puppet::Network::Client.runner.new(
             :Server => host,
-            :Port => Puppet[:puppetport]
+            :Port => port
         )
 
         print "Triggering %s\n" % host
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to