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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top