Sha256: 7e13bab6895cabd71399a2a48581074738f61cb9c123e00db7dc816457cd4943

Contents?: true

Size: 1.87 KB

Versions: 36

Compression:

Stored size: 1.87 KB

Contents

require 'config_builder/model'

# @since 0.13.0
class PEBuild::ConfigBuilder::PEAgent < ::ConfigBuilder::Model::Base
  # @!attribute [rw] autosign
  #   If true, and {#master_vm} is set, the agent's certificate will be signed
  #   on the master VM.
  #
  #   @return [true, false] Defaults to `true` if {#master_vm} is set,
  #     otherwise `false`.
  def_model_attribute :autosign
  # @!attribute [rw] autopurge
  #   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.
  #
  #   @return [true, false] Defaults to `true` if {#master_vm} is set,
  #     otherwise `false`.
  def_model_attribute :autopurge
  # @!attribute master
  #   @return [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.
  def_model_attribute :master
  # @!attribute master_vm
  #   @return [String] The name of a Vagrant VM to use as the master.
  def_model_attribute :master_vm
  # @!attribute version
  #   @return [String] The version of PE to install. May be either a version
  #   string of the form `x.y.x[-optional-arbitrary-stuff]` or the string
  #   `current`. Defaults to `current`.
  def_model_attribute :version

  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

  ::ConfigBuilder::Model::Provisioner.register('pe_agent', self)
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
vagrant-pe_build-0.19.2 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.19.1 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.19.0 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.18.2 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.18.1 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.18.0 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.14 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.13 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.12 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.11 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.10 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.9 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.8 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.7 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.6 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.5 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.4 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.3 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.2 lib/pe_build/config_builder/0_x/pe_agent.rb
vagrant-pe_build-0.17.1 lib/pe_build/config_builder/0_x/pe_agent.rb