Class: ConfigBuilder::Model::Provisioner::File
- Defined in:
- lib/config_builder/model/provisioner/file.rb
Overview
Instance Attribute Summary collapse
-
#destination ⇒ Source
Is the remote path on the guest machine where the file will be uploaded to.
-
#source ⇒ Source
Is the local path of the file to be uploaded.
Instance Method Summary collapse
Methods inherited from Base
#attrs=, #call, def_model_attribute, model_attributes, new_from_hash
Instance Attribute Details
#destination ⇒ Source
Returns Is the remote path on the guest machine where the file will be uploaded to. The file is uploaded as the SSH user over SCP, so this location must be writable to that user. The SSH user can be determined by running vagrant ssh-config, and defaults to "vagrant".
12 |
# File 'lib/config_builder/model/provisioner/file.rb', line 12 def_model_attribute :destination |
#source ⇒ Source
Returns Is the local path of the file to be uploaded.
5 |
# File 'lib/config_builder/model/provisioner/file.rb', line 5 def_model_attribute :source |
Instance Method Details
#to_proc ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/config_builder/model/provisioner/file.rb', line 14 def to_proc Proc.new do |vm_config| vm_config.provision :file do |file_config| with_attr(:source) { |val| file_config.source = val } with_attr(:destination) { |val| file_config.destination = val } end end end |