Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view Chef Attributes on a Chef Solo Vagrant Node?

I'm in the process of testing a cookbook, and one of the LWRP's seems to not contain an attribute that I am expecting it to. I need to see a list of attributes that are being set on the node. Is there a way to do this within a Vagrant chef-solo node?

I use kitchen converge which uses chef-solo to provision a vagrant box on my virtualbox vagrant-provider. The node is thus not registered to a chef-server where I'd normally use knife node show <node-name> to view a list of the attributes.

like image 365
Highway of Life Avatar asked Oct 21 '22 16:10

Highway of Life


1 Answers

Ssh to your vagrant box and start chef_shell. If you run your recipe from there, you will be able to add breakpoints and examine node objects, including the available attributes.

like image 62
Draco Ater Avatar answered Oct 24 '22 00:10

Draco Ater