CHEF, how do you replace node.set / node.save in a solo chef?

How do you change node.set/ node.savein a solo chef?

I use 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 the chef is not node.set/ node.save. So what replaces this? How to keep constant flags in this example in the solo chef?

+4
source share
1 answer

There is no persistence in Chef Solo (this is one of the main shortcomings). You should do something like this:

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

You can still call node.setsafely, but this data is saved only in progress.

Chef Zero Solo.

+2

All Articles