Sha256: 6e53dd4d3a11f4b98b43a62e02c523d8eb62a1370f4feae8f006df2884718068

Contents?: true

Size: 1.03 KB

Versions: 47

Compression:

Stored size: 1.03 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

47 entries across 47 versions & 1 rubygems

Version Path
chef-provisioning-2.7.6 lib/chef/resource/machine_image.rb
chef-provisioning-2.7.4 lib/chef/resource/machine_image.rb
chef-provisioning-2.7.2 lib/chef/resource/machine_image.rb
chef-provisioning-2.7.1 lib/chef/resource/machine_image.rb
chef-provisioning-2.7.0 lib/chef/resource/machine_image.rb
chef-provisioning-2.6.0 lib/chef/resource/machine_image.rb
chef-provisioning-2.5.0 lib/chef/resource/machine_image.rb
chef-provisioning-2.4.0 lib/chef/resource/machine_image.rb
chef-provisioning-2.3.2 lib/chef/resource/machine_image.rb
chef-provisioning-2.3.1 lib/chef/resource/machine_image.rb
chef-provisioning-2.3.0 lib/chef/resource/machine_image.rb
chef-provisioning-2.2.1 lib/chef/resource/machine_image.rb
chef-provisioning-2.2.0 lib/chef/resource/machine_image.rb
chef-provisioning-2.1.1 lib/chef/resource/machine_image.rb
chef-provisioning-2.1.0 lib/chef/resource/machine_image.rb
chef-provisioning-2.0.2 lib/chef/resource/machine_image.rb
chef-provisioning-2.0.0 lib/chef/resource/machine_image.rb
chef-provisioning-1.9.1 lib/chef/resource/machine_image.rb
chef-provisioning-1.9.0 lib/chef/resource/machine_image.rb
chef-provisioning-1.8.1 lib/chef/resource/machine_image.rb