Class: CemAcpt::ImageBuilder::ProvisionCommands::EnterpriseLinuxFamily

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) ⇒ EnterpriseLinuxFamily

Returns a new instance of EnterpriseLinuxFamily.



8
9
10
11
12
13
14
# File 'lib/cem_acpt/image_builder/provision_commands.rb', line 8

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



16
17
18
# File 'lib/cem_acpt/image_builder/provision_commands.rb', line 16

def default_provision_commands
  [enable_puppet_repository_command, install_puppet_agent_command]
end

#provision_commandsObject Also known as: to_a



20
21
22
23
# File 'lib/cem_acpt/image_builder/provision_commands.rb', line 20

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