lib/catfish/cli.rb in catfish-0.0.4 vs lib/catfish/cli.rb in catfish-0.0.5
- old
+ new
@@ -3,19 +3,10 @@
module Catfish
class CLI < Thor
include Thor::Actions
- # def self.start(*)
- # super
- # rescue Exception => e
- # Bundler.ui = UI::Shell.new
- # raise e
- # ensure
- # Bundler.cleanup
- # end
-
def initialize(*args)
super
rescue UnknownArgumentError => e
raise InvalidOption, e.message
ensure
@@ -30,14 +21,20 @@
long_desc <<-D
TODO: Long description
D
method_option 'provisioners', type: :array, banner: 'A list of vagrant provisiners to use'
method_option 'communicator', type: :string, banner: 'The communicator. ssh (default) or winrm'
+ method_option 'windows', type: :boolean, banner: 'Shorthand for --communicator=winrm'
method_option 'winrm-username', type: :string, banner: 'Username for winrm. Used with --communicator=winrm'
method_option 'winrm-password', type: :string, banner: 'Password for winrm. Used with --communicator=winrm'
+ method_option 'shell', type: :boolean, banner: 'Shorthand for provisioners=shell'
method_option 'shell-paths', type: :array, banner: 'A list of paths to use if shell provisioning is selected'
method_option 'ssh-username', type: :string, banner: 'SSH username'
method_option 'ssh-private-key-path', type: :string, banner: 'Path to SSH private key'
+ method_option 'puppet', type: :boolean, banner: 'Shorthand for provisioners=puppet'
+ method_option 'puppet-librarian-puppet', type: :boolean, default: 'true',
+ banner: 'Whether or not to include a default Puppetfile and librarian puppet plugin'
+ method_option 'puppet-hiera', type: :boolean, default: 'true', banner: 'Include hiera templates. Only applies to puppet provisioner'
method_option 'servers', type: :array, banner: 'Initial list of servers to include in Catfishfile'
method_option 'plugins', type: :array, banner: 'Vagrant plugins to be installed'
def init
require 'catfish/cli/init'
Init.new(options.dup, self).run