Sha256: 06b8cec15cc984343654df8a78cb17ca021e9baf49d0c74b42609faf407644e9

Contents?: true

Size: 851 Bytes

Versions: 11

Compression:

Stored size: 851 Bytes

Contents

require 'chef/resource/lwrp_base'
require 'chef_metal'
require 'chef_metal/machine'
require 'chef_metal/provisioner'

class Chef::Resource::MachineFile < Chef::Resource::LWRPBase
  self.resource_name = 'machine_file'

  def initialize(*args)
    super
    @chef_server = Cheffish.enclosing_chef_server
    @provisioner = ChefMetal.enclosing_provisioner
  end

  actions :upload, :download, :delete, :nothing
  default_action :upload

  attribute :path, :kind_of => String, :name_attribute => true
  attribute :machine, :kind_of => [String, ChefMetal::Machine]
  attribute :local_path, :kind_of => String
  attribute :content

  attribute :owner, :kind_of => String
  attribute :group, :kind_of => String
  attribute :mode, :kind_of => String

  attribute :chef_server, :kind_of => Hash
  attribute :provisioner, :kind_of => ChefMetal::Provisioner
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
chef-metal-0.9.4 lib/chef/resource/machine_file.rb
chef-metal-0.9.3 lib/chef/resource/machine_file.rb
chef-metal-0.9.2 lib/chef/resource/machine_file.rb
chef-metal-0.9.1 lib/chef/resource/machine_file.rb
chef-metal-0.9 lib/chef/resource/machine_file.rb
chef-metal-0.8.2 lib/chef/resource/machine_file.rb
chef-metal-0.8.1 lib/chef/resource/machine_file.rb
chef-metal-0.8 lib/chef/resource/machine_file.rb
chef-metal-0.7 lib/chef/resource/machine_file.rb
chef-metal-0.6 lib/chef/resource/machine_file.rb
chef-metal-0.5 lib/chef/resource/machine_file.rb