Permalink
Browse files

Add bind option for using puppet-rundeck remotely

  • Loading branch information...
1 parent 0957029 commit c46fd918df0f2febc4bfbebfffe04eea391482b2 @ncapeyron ncapeyron committed Nov 25, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 bin/puppet-rundeck
View
@@ -46,6 +46,11 @@ optparse = OptionParser.new do |opts|
options[:port] = port
end
+ options[:bind] = "localhost"
+ opts.on( '-b', '--bind HOSTNAME', 'The hostname or IP address of the interface to run puppet-rundeck on') do |bind|
+ options[:bind] = bind
+ end
+
options[:ssh_port] = 22
opts.on( '-P', '--ssh-port PORT', 'The default port used by sshd on your puppet nodes') do |ssh_port|
options[:ssh_port] = ssh_port
@@ -66,7 +71,7 @@ begin
PuppetRundeck.username = options[:username]
PuppetRundeck.ssh_port = options[:ssh_port]
PuppetRundeck.configure
- PuppetRundeck.run! :host => "localhost", :port => options[:port]
+ PuppetRundeck.run! :bind => options[:bind], :port => options[:port]
rescue OptionParser::InvalidArgument, OptionParser::InvalidOption, OptionParser::MissingArgument
puts $!.to_s
puts optparse

0 comments on commit c46fd91

Please sign in to comment.