lib/chef/provisioning/chef_image_spec.rb in chef-provisioning-0.16 vs lib/chef/provisioning/chef_image_spec.rb in chef-provisioning-0.17
- old
+ new
@@ -58,9 +58,12 @@
def save(action_handler)
# Save the node to the server.
_self = self
_chef_server = _self.chef_server
Chef::Provisioning.inline_resource(action_handler) do
+ # Create the data bag if needed
+ chef_data_bag 'images'
+ # Save the image
chef_data_bag_item _self.name do
data_bag 'images'
chef_server _chef_server
raw_data _self.image_data
end