Sha256: e937ac857719a56b08d7624bf786aacd35ee288512b6bdb04f713a7d0066ac31
Contents?: true
Size: 1.09 KB
Versions: 3
Compression:
Stored size: 1.09 KB
Contents
#!/usr/bin/env ruby # $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib]) require 'app' require 'optparse' options = {} OptionParser.new do |opts| opts.banner = "Usage: puppetdb_rundeck [options]" opts.on("--port PORT", String, "The port on which to run the appllication") do |p| options[:port] = p end opts.on("--pdbhost HOSTNAME", String, "The hostname of the PuppetDB instance") do |ph| options[:pdbhost] = ph end opts.on("--pdbport PORT", String, "The port of the PuppetDB instance") do |pp| options[:pdbport] = pp end end.parse! if options[:pdbhost].nil? or options[:pdbhost].eql?('') puts 'The --pdbhost option must be specified' exit 1 end if options[:pdbport].nil? or options[:pdbport].eql?('') puts 'The --pdbport option must be specified' exit 1 end PuppetDBRunDeck.set :bind, '0.0.0.0' PuppetDBRunDeck.set :puppetdb_host, options[:pdbhost] PuppetDBRunDeck.set :puppetdb_port, options[:pdbport] if options[:port].nil? or options[:port].eql?('') PuppetDBRunDeck.set :port, '4567' else PuppetDBRunDeck.set :port, options[:port] end PuppetDBRunDeck.run!
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
puppetdb_rundeck-0.3.1 | bin/puppetdb_rundeck |
puppetdb_rundeck-0.3.0 | bin/puppetdb_rundeck |
puppetdb_rundeck-0.2.3 | bin/puppetdb_rundeck |