Class: PEBuild::ConfigBuilder::PEAgent

Inherits:
ConfigBuilder::Model::Provisioner::Base
  • Object
show all
Defined in:
lib/pe_build/config_builder/0_x/pe_agent.rb,
lib/pe_build/config_builder/1_x/pe_agent.rb

Overview

Since:

  • 0.13.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#agent_typeString

This allows for configuring the agent as an infrastructure component. May be either compile, replica, oragent. Defaults toagent`.

Returns:

  • (String)

    The type of agent installation this will be.



38
# File 'lib/pe_build/config_builder/1_x/pe_agent.rb', line 38

def_model_attribute :agent_type

#autopurgetrue, false

If true, and #master_vm is set, the agent's certificate and data will be purged from the master VM if the agent is destroyed by Vagrant.

Returns:

  • (true, false)

    Defaults to true if #master_vm is set, otherwise false.



18
# File 'lib/pe_build/config_builder/0_x/pe_agent.rb', line 18

def_model_attribute :autopurge

#autosigntrue, false

If true, and #master_vm is set, the agent's certificate will be signed on the master VM.

Returns:

  • (true, false)

    Defaults to true if #master_vm is set, otherwise false.



11
# File 'lib/pe_build/config_builder/0_x/pe_agent.rb', line 11

def_model_attribute :autosign

#masterString

Returns The DNS hostname of the Puppet master for this node. If #master_vm is set, the hostname of that machine will be used as a default. If the hostname is unset, the name of the VM will be used as a secondary default.

Returns:

  • (String)

    The DNS hostname of the Puppet master for this node. If #master_vm is set, the hostname of that machine will be used as a default. If the hostname is unset, the name of the VM will be used as a secondary default.



24
# File 'lib/pe_build/config_builder/0_x/pe_agent.rb', line 24

def_model_attribute :master

#master_vmString

Returns The name of a Vagrant VM to use as the master.

Returns:

  • (String)

    The name of a Vagrant VM to use as the master.



27
# File 'lib/pe_build/config_builder/0_x/pe_agent.rb', line 27

def_model_attribute :master_vm

#versionString

string of the form x.y.x[-optional-arbitrary-stuff] or the string current. Defaults to current.

Returns:

  • (String)

    The version of PE to install. May be either a version



32
# File 'lib/pe_build/config_builder/0_x/pe_agent.rb', line 32

def_model_attribute :version

Instance Method Details

#to_procObject

Since:

  • 0.13.0



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/pe_build/config_builder/0_x/pe_agent.rb', line 34

def to_proc
  Proc.new do |vm_config|
    vm_config.provision :pe_agent do |config|
      with_attr(:autosign)     {|val| config.autosign     = val }
      with_attr(:autopurge)    {|val| config.autopurge    = val }
      with_attr(:master)       {|val| config.master       = val }
      with_attr(:master_vm)    {|val| config.master_vm    = val }
      with_attr(:version)      {|val| config.version      = val }
    end
  end
end