문제

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