lib/rundock/cli.rb in rundock-0.3.0 vs lib/rundock/cli.rb in rundock-0.4.0

- old
+ new

@@ -4,10 +4,11 @@ module Rundock class CLI < Thor DEFAULT_SCENARIO_FILE_PATH = './scenario.yml' DEFAULT_SSH_OPTIONS_DEFAULT_FILE_PATH = './default_ssh.yml' DEFAULT_HOSTGROUP_FILE_PATH = './hostgroup.yml' + DEFAULT_HOOKS_FILE_PATH = './hooks.yml' class_option :log_level, type: :string, aliases: ['-l'], default: 'info' class_option :color, type: :boolean, default: true class_option :header, type: :boolean, default: true @@ -25,10 +26,11 @@ end desc 'do [SCENARIO] [options]', 'Run rundock from scenario file' option :sudo, type: :boolean, default: false option :default_ssh_opts, type: :string, aliases: ['-d'], default: DEFAULT_SSH_OPTIONS_DEFAULT_FILE_PATH + option :hooks, type: :string, aliases: ['-k'], default: DEFAULT_HOOKS_FILE_PATH option :run_anyway, type: :boolean, default: false option :dry_run, type: :boolean, aliases: ['-n'] def do(*scenario_file_path) scenario_file_path = [DEFAULT_SCENARIO_FILE_PATH] if scenario_file_path.empty? opts = { :scenario => scenario_file_path[0] } @@ -37,9 +39,10 @@ end desc 'ssh [options]', 'Run rundock ssh with various options' option :command, type: :string, aliases: ['-c'] option :default_ssh_opts, type: :string, aliases: ['-d'], default: DEFAULT_SSH_OPTIONS_DEFAULT_FILE_PATH + option :hooks, type: :string, aliases: ['-k'], default: DEFAULT_HOOKS_FILE_PATH option :host, type: :string, aliases: ['-h'], banner: 'You can specify comma separated hosts.[ex: host1,host2,..]' option :hostgroup, type: :string, aliases: ['-g'] option :user, type: :string, aliases: ['-u'] option :key, type: :string, aliases: ['-i'] option :port, type: :numeric, aliases: ['-p']