Sha256: 3a23d084760549f8e049ebb545def73324fb83521f8b26aad493bfb5fde12fad
Contents?: true
Size: 1.24 KB
Versions: 6
Compression:
Stored size: 1.24 KB
Contents
require 'trollop' module SimpleDeploy module CLI class Instances def list opts = Trollop::options do version SimpleDeploy::VERSION banner <<-EOS List instances for stack. simple_deploy instances -n STACK_NAME -e ENVIRONMENT EOS opt :help, "Display Help" opt :environment, "Set the target environment", :type => :string opt :name, "Stack name to manage", :type => :string opt :internal, "Use internal IP for ssh commands" end CLI::Shared.valid_options? :provided => opts, :required => [:environment, :name] config = Config.new.environment opts[:environment] logger = SimpleDeployLogger.new :log_level => opts[:log_level] stack = Stack.new :environment => opts[:environment], :name => opts[:name], :config => config, :logger => logger, :internal => opts[:internal] instances = stack.instances if instances.nil? || instances.empty? puts "stack '#{opts[:name]}' does not exist" else jj stack.instances end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems