Question

How do you replace node.set/node.save in chef solo?

I am using node.set/node.save in this example to execute certain commands on first run-> http://docs.opscode.com/essentials_cookbook_resources_first_run.html

But on chef-solo there is no node.set/node.save. So what replaces that? How to store persistent flags in this example in chef solo?

Was it helpful?

Solution

There is no persistence in Chef Solo (it's one of the major drawbacks). You should do something like this:

node.save unless Chef::Config[:solo]

You can still call node.set safely, but that data is only persisted in the run.

You may also want to look into something like Chef Zero or Knife Solo.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top