Class: ConfigBuilder::Model::Provisioner::Shell

Inherits:
Base
  • Object
show all
Defined in:
lib/config_builder/model/provisioner/shell.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#attrs=, #call, def_model_attribute, model_attributes, new_from_hash

Instance Attribute Details

#argsString

Returns A string acting as an argument vector to the command.

Returns:

  • (String)

    A string acting as an argument vector to the command.



14
# File 'lib/config_builder/model/provisioner/shell.rb', line 14

def_model_attribute :args

#inlineString

Returns The inline shell command to run.

Returns:

  • (String)

    The inline shell command to run



6
# File 'lib/config_builder/model/provisioner/shell.rb', line 6

def_model_attribute :inline

#pathString

Returns The path to the shell script to run.

Returns:

  • (String)

    The path to the shell script to run



10
# File 'lib/config_builder/model/provisioner/shell.rb', line 10

def_model_attribute :path

Instance Method Details

#to_procObject



16
17
18
19
20
21
22
23
24
# File 'lib/config_builder/model/provisioner/shell.rb', line 16

def to_proc
  Proc.new do |vm_config|
    vm_config.provision :shell do |shell_config|
      with_attr(:inline) { |val| shell_config.inline = val }
      with_attr(:path)   { |val| shell_config.path   = val }
      with_attr(:args)   { |val| shell_config.args   = val }
    end
  end
end