Sha256: 1bc83b44cb118254c1eb39e876b95f0d3eaaa60f7c9807e6c36ef92ffb365723

Contents?: true

Size: 938 Bytes

Versions: 4

Compression:

Stored size: 938 Bytes

Contents

#!/usr/bin/env ruby
require 'rubygems'
require 'optparse'
$LOAD_PATH << "#{File.dirname(__FILE__)}/../lib"
require 'runpuppet'

options = {}

OptionParser.new do |opts|
  opts.banner = <<BANNER
Runpuppet for puppet_controller

Usage:
    runpuppet # runs forced puppetrun
    runpuppet --try # runs only if told by puppet_controller
    runpuppet --branch feature # run a non-default branch
    runpuppet --facts # report facter facts to puppet_controller
Options:
BANNER

  opts.on("-h", "--help","Show this.") { puts opts; exit }
  opts.on('-v', '--version','Show Version'){ puts Runpuppet::VERSION; exit}
  opts.on('--try','Runs only if selected on puppet_controller'){ options[:try] = true }
  opts.on('--facts','Report facts'){ options[:facts] = true }
  opts.on('--branch x', 'Run this branch') do |branch|
    options[:branch] = branch
  end
end.parse!

if options[:facts]
  Runpuppet.report_facts
else
  Runpuppet.run(options)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
runpuppet-0.5.11 bin/runpuppet
runpuppet-0.5.10 bin/runpuppet
runpuppet-0.5.9 bin/runpuppet
runpuppet-0.5.8 bin/runpuppet