chef-infraserverspec

How to set a node attribute with serverspec


I'm pretty new to serverspec. I have a recipe which uses something along the lines of the following:

c = node['a']['b']

My question is, in the actual test, how could i set that value?


Solution

  • You cannot. Serverspec is unrelated to Chef and doesn't know anything about node attributes. It has its own very limited version of ohai, so you can see the platform name and version and that's about it.