How to create a data packet from a recipe and avoid an exception when this data packet already exists?
The documentation shows that the creation of a data packet is as follows:
new_databag = Chef::DataBag.new new_databag.name('unique_name') new_databag.save
This works when the database does not exist yet, but how to make it work if the database already exists so that it does not interrupt the work of the chef?
source share