Class: ConfigBuilder::Model::Provisioner::Puppet

Inherits:
Base
  • Object
show all
Defined in:
lib/config_builder/model/provisioner/puppet.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#attrs=, #call, def_model_attribute, model_attributes, new_from_hash

Instance Attribute Details

#facterHash

Returns A hash of values to use as facts.

Returns:

  • (Hash)

    A hash of values to use as facts



18
19
20
# File 'lib/config_builder/model/provisioner/puppet.rb', line 18

def facter
  @facter
end

#manifest_fileString

Returns The name of the manifest to apply.

Returns:

  • (String)

    The name of the manifest to apply



10
11
12
# File 'lib/config_builder/model/provisioner/puppet.rb', line 10

def manifest_file
  @manifest_file
end

#manifests_pathString

Returns The path to the puppet manifests.

Returns:

  • (String)

    The path to the puppet manifests.



6
7
8
# File 'lib/config_builder/model/provisioner/puppet.rb', line 6

def manifests_path
  @manifests_path
end

#module_pathString

Returns A colon separated set of filesystem paths for Puppet.

Returns:

  • (String)

    A colon separated set of filesystem paths for Puppet



14
15
16
# File 'lib/config_builder/model/provisioner/puppet.rb', line 14

def module_path
  @module_path
end

#optionsString

Returns An arbitrary set of arguments for the puppet command.

Returns:

  • (String)

    An arbitrary set of arguments for the puppet command



22
23
24
# File 'lib/config_builder/model/provisioner/puppet.rb', line 22

def options
  @options
end

Instance Method Details

#to_procObject



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/config_builder/model/provisioner/puppet.rb', line 24

def to_proc
  Proc.new do |vm_config|
    vm_config.provision :puppet do |puppet_config|
      with_attr(:manifests_path) { |val| puppet_config.manifests_path = val }
      with_attr(:manifest_file)  { |val| puppet_config.manifest_file  = val }
      with_attr(:module_path)    { |val| puppet_config.module_path    = val }
      with_attr(:facter)         { |val| puppet_config.facter         = val }
      with_attr(:options)        { |val| puppet_config.options        = val }
    end
  end
end