Sha256: 550ad8d9b28410f49dbee758fdd2bf77647d5340cb369e26ec298c492526e280

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

require 'chef/resource/lwrp_base'
require 'cheffish'
require 'chef/provisioning'
require 'cheffish/merged_config'

class Chef
class Resource
class MachineImage < Chef::Resource::Machine

  self.resource_name = 'machine_image'

  def initialize(*args)
    super
    @image_options = run_context.chef_provisioning.current_image_options
    @machine_options = run_context.chef_provisioning.current_machine_options
  end

  # TODO check if we still have all the actions from machine
  actions :create, :destroy, :archive
  default_action :create

  attribute :image_options, :kind_of => Hash

  # TODO
  # - policy for old version cleanup
  # - when attributes or recipes of the machine_image changes, or when the actual
  #   recipes therein change, we will regenerate the image
  # - attribute to force or turn off image updates
  # - ability to rebuild new image based on the previous image
  # - ability to specify whether and how to keep the image-building machine around
  # - ability to specify whether to leave the chef config around or not

end
end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chef-provisioning-2.0.1 lib/chef/resource/machine_image.rb