Class: Packer::Provisioner::Chef::Solo

Inherits:
Packer::Provisioner::Chef show all
Defined in:
lib/packer/provisioners/chef/solo.rb

Constant Summary

Constants inherited from Packer::Provisioner

ANSIBLE, Packer::Provisioner::CHEF_CLIENT, Packer::Provisioner::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

#initializeSolo

Returns a new instance of Solo.



9
10
11
12
13
# File 'lib/packer/provisioners/chef/solo.rb', line 9

def initialize
  super
  self.data['type'] = CHEF_SOLO
  #self.add_required([])
end

Instance Method Details

#config_template(filename) ⇒ Object



15
16
17
# File 'lib/packer/provisioners/chef/solo.rb', line 15

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

#cookbook_paths(paths) ⇒ Object



19
20
21
# File 'lib/packer/provisioners/chef/solo.rb', line 19

def cookbook_paths(paths)
  self.__add_array_of_strings('cookbook_paths', paths)
end

#data_bags_path(path) ⇒ Object



23
24
25
# File 'lib/packer/provisioners/chef/solo.rb', line 23

def data_bags_path(path)
  self.__add_string('data_bags_path', path)
end

#encrypted_data_bag_secret_path(path) ⇒ Object



27
28
29
# File 'lib/packer/provisioners/chef/solo.rb', line 27

def encrypted_data_bag_secret_path(path)
  self.__add_string('encrypted_data_bag_secret_path', path)
end

#execute_command(command) ⇒ Object



31
32
33
# File 'lib/packer/provisioners/chef/solo.rb', line 31

def execute_command(command)
  self.__add_string('execute_command', command)
end

#install_command(command) ⇒ Object



35
36
37
# File 'lib/packer/provisioners/chef/solo.rb', line 35

def install_command(command)
  self.__add_string('install_command', command)
end

#json(hash) ⇒ Object



39
40
41
# File 'lib/packer/provisioners/chef/solo.rb', line 39

def json(hash)
  self.__add_json('json', hash)
end

#prevent_sudo(bool) ⇒ Object



43
44
45
# File 'lib/packer/provisioners/chef/solo.rb', line 43

def prevent_sudo(bool)
  self.__add_boolean('prevent_sudo', bool)
end

#remote_cookbook_paths(paths) ⇒ Object



47
48
49
# File 'lib/packer/provisioners/chef/solo.rb', line 47

def remote_cookbook_paths(paths)
  self.__add_array_of_strings('remote_cookbook_paths', paths)
end

#roles_path(path) ⇒ Object



51
52
53
# File 'lib/packer/provisioners/chef/solo.rb', line 51

def roles_path(path)
  self.__add_string('roles_path', path)
end

#run_list(runlist) ⇒ Object



55
56
57
# File 'lib/packer/provisioners/chef/solo.rb', line 55

def run_list(runlist)
  self.__add_array_of_strings('run_list', runlist)
end

#skip_install(bool) ⇒ Object



59
60
61
# File 'lib/packer/provisioners/chef/solo.rb', line 59

def skip_install(bool)
  self.__add_boolean('skip_install', bool)
end

#staging_directory(dirname) ⇒ Object



63
64
65
# File 'lib/packer/provisioners/chef/solo.rb', line 63

def staging_directory(dirname)
  self.__add_string('staging_directory', dirname)
end