Class: Packer::Provisioner::File

Inherits:
Packer::Provisioner show all
Defined in:
lib/packer/provisioners/file.rb

Constant Summary

Constants inherited from Packer::Provisioner

ANSIBLE, CHEF_CLIENT, CHEF_SOLO, FILE, POWERSHELL, PUPPET_MASTERLESS, PUPPET_SERVER, SALT, SHELL, VALID_PROVISIONER_TYPES, WINDOWS_RESTART, WINDOWS_SHELL

Instance Attribute Summary

Attributes inherited from DataObject

#data, #key_dependencies, #required

Instance Method Summary collapse

Methods inherited from Packer::Provisioner

#except, get_provisioner, #only, #override, #pause_before, types

Methods inherited from DataObject

#__add_array_of_array_of_strings, #__add_array_of_hashes, #__add_array_of_ints, #__add_array_of_strings, #__add_boolean, #__add_hash, #__add_integer, #__add_json, #__add_string, #__exclusive_key_error, #add_key_dependencies, #add_required, #deep_copy, #validate, #validate_key_dependencies, #validate_required

Constructor Details

#initializeFile

Returns a new instance of File.



8
9
10
11
12
# File 'lib/packer/provisioners/file.rb', line 8

def initialize
  super
  self.data['type'] = FILE
  self.add_required('source', 'destination')
end

Instance Method Details

#destination(filename) ⇒ Object



18
19
20
# File 'lib/packer/provisioners/file.rb', line 18

def destination(filename)
  self.__add_string('destination', filename)
end

#source(filename) ⇒ Object



14
15
16
# File 'lib/packer/provisioners/file.rb', line 14

def source(filename)
  self.__add_string('source', filename)
end