Class: CemAcpt::ImageBuilder::ProvisionCommands::DebianFamily

Inherits:
Object
  • Object
show all
Defined in:
lib/cem_acpt/image_builder/provision_commands.rb

Instance Method Summary collapse

Constructor Details

#initialize(config, image_name, base_image, os_major_version, puppet_version) ⇒ DebianFamily

Returns a new instance of DebianFamily.



78
79
80
81
82
83
84
# File 'lib/cem_acpt/image_builder/provision_commands.rb', line 78

def initialize(config, image_name, base_image, os_major_version, puppet_version)
  @config = config
  @image_name = image_name
  @base_image = base_image
  @os_major_version = os_major_version
  @puppet_version = puppet_version
end

Instance Method Details

#default_provision_commandsObject



86
87
88
# File 'lib/cem_acpt/image_builder/provision_commands.rb', line 86

def default_provision_commands
  [install_curl_command, enable_puppet_repository_command, upgrade_packages_command, install_puppet_agent_command]
end

#provision_commandsObject Also known as: to_a



90
91
92
93
# File 'lib/cem_acpt/image_builder/provision_commands.rb', line 90

def provision_commands
  commands_from_config = @config.get("images.#{@image_name}.provision_commands") || []
  (default_provision_commands + commands_from_config).compact
end