Class: GreenAndSecure::Block

Inherits:
Chef::Knife show all
Defined in:
lib/chef/knife/block.rb

Instance Method Summary collapse

Methods inherited from Chef::Knife

#get_config_file

Instance Method Details

#runObject



103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/chef/knife/block.rb', line 103

def run
  GreenAndSecure::check_block_setup
  list = GreenAndSecure::BlockList.new
  if name_args.size == 1 and list.servers.include?(name_args[0])
    use = GreenAndSecure::BlockUse.new
    use.name_args = name_args
    use.run
  else
    puts 'Did you mean to run "knife block list" instead?'
    puts 'Running "knife block list" for you now'
    list.run
  end
end