class ImageBuilder::Provisioners::Shell

Generic class doc comment

Attributes

binary[RW]

Optional

environment_vars[RW]
execute_command[RW]
inline[RW]

Only one of these is allowed/required

inline_shebang[RW]
remote_path[RW]
script[RW]
scripts[RW]
start_retry_timeout[RW]
type[R]

Public Class Methods

new() click to toggle source
# File lib/image_builder/provisioners/shell.rb, line 22
def initialize
  @type = 'shell'
end

Public Instance Methods

packer_hash() click to toggle source
# File lib/image_builder/provisioners/shell.rb, line 26
def packer_hash
  hash = { type: @type }

  # Let packer enforce the validation requirements
  # for these attributes, don't make them required
  attr_to_hash(hash, :inline)
  attr_to_hash(hash, :script)
  attr_to_hash(hash, :scripts)

  # Optional attrs
  attr_to_hash(hash, :binary)
  attr_to_hash(hash, :environment_vars)
  attr_to_hash(hash, :execute_command)
  attr_to_hash(hash, :inline_shebang)
  attr_to_hash(hash, :remote_path)
  attr_to_hash(hash, :start_retry_timeout)

  hash
end