class Inprovise::Cli

CLI Group commands for Inprovise

Author

Martin Corino

License

Distributes under the same license as Ruby

CLI Node commands for Inprovise

Author

Martin Corino

License

Distributes under the same license as Ruby

CLI provisioning commands for Inprovise

Author

Martin Corino

License

Distributes under the same license as Ruby

Public Class Methods

setup_provisioning_cmd(cmd, with_force=true, &block) click to toggle source
# File lib/inprovise/cli/provision.rb, line 8
def self.setup_provisioning_cmd(cmd, with_force=true, &block)
  cmd.desc 'Path to a provisioning scheme to load'
  cmd.flag [:s,:scheme], :arg_name => 'FILE', :multiple => true, :default_value => Inprovise.default_scheme
  cmd.flag [:c, :config], :arg_name => 'CFGKEY=CFGVAL', :multiple => true, :desc => 'Specify a configuration setting for the script execution'
  cmd.switch [:f, :force], negatable: false, :desc => 'Force command to run without verifying validity.' if with_force
  cmd.action(&block)
end
show_target(tgt, details=false) click to toggle source
# File lib/inprovise/cli.rb, line 100
def self.show_target(tgt, details=false)
  $stdout.puts "   #{tgt}"
  if details
    $stdout.puts "   \t"+JSON.pretty_generate(tgt.config).split("\n").join("\n   \t")
  end
end