Class: Chef::Knife::TagList

Inherits:
Knife
  • Object
show all
Defined in:
lib/chef/knife/tag_list.rb

Instance Method Summary collapse

Instance Method Details

#runObject



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/chef/knife/tag_list.rb', line 33

def run
  name = @name_args[0]

  if name.nil?
    show_usage
    ui.fatal("You must specify a node name.")
    exit 1
  end

  node = Chef::Node.load(name)
  output(node.tags)
end