Class: Chef::Knife::InventoryCookbook
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::InventoryCookbook
- Defined in:
- lib/chef/knife/inventory_cookbook.rb
Instance Attribute Summary collapse
-
#cookbook_name ⇒ Object
readonly
Returns the value of attribute cookbook_name.
-
#cookbook_version ⇒ Object
readonly
Returns the value of attribute cookbook_version.
Instance Method Summary collapse
Instance Attribute Details
#cookbook_name ⇒ Object
Returns the value of attribute cookbook_name.
39 40 41 |
# File 'lib/chef/knife/inventory_cookbook.rb', line 39 def cookbook_name @cookbook_name end |
#cookbook_version ⇒ Object
Returns the value of attribute cookbook_version.
40 41 42 |
# File 'lib/chef/knife/inventory_cookbook.rb', line 40 def cookbook_version @cookbook_version end |
Instance Method Details
#run ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/chef/knife/inventory_cookbook.rb', line 22 def run @cookbook_name = name_args[0] @cookbook_version = name_args[1] @show_env_constraints = config[:env_constraints] unless @cookbook_name ui.error "You need to specify a cookbook" exit 1 end if @cookbook_version output_version_analysis else output_analysis end end |