Sha256: d9dd685090f47b0246365f1901446b410d03d651354ca9fe64bfd9d227fd7e88

Contents?: true

Size: 913 Bytes

Versions: 69

Compression:

Stored size: 913 Bytes

Contents

# Takes a key to lookup in the installation answers file
# - If it's a hash, declare a class with those parameters
# - If it's true or "true" declare the default parameters for that class
# - If it's false or "false" ignore it
# - Otherwise fail with error
#
define kafo_configure::yaml_to_class {

  $classname = class_name($name)

  if is_hash($kafo_configure::params[$name]) {
    # The quotes around $classname seem to matter to puppet's parser...
    $params = { "${classname}" => $kafo_configure::params[$name] }
    create_resources( 'class', $params )
  } elsif $kafo_configure::params[$name] == true {
    $params = { "${classname}" => {} }
    create_resources( 'class', $params )
  } elsif ! $kafo_configure::params[$name] or $kafo_configure::params[$name] == "false" {
    debug("${::hostname}: not including $name")
  } else {
    fail("${::hostname}: unknown type of answers data for $name")
  }

}

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
kafo-0.7.6 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.7.5 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.7.4 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.8.2 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.8.1 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.8.0 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.7.3 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.7.2 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.7.1 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.7.0 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.6.12 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.6.11 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.6.10 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.6.9 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.6.8 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.6.7 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.6.6 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.6.5 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.6.4 modules/kafo_configure/manifests/yaml_to_class.pp
kafo-0.6.3 modules/kafo_configure/manifests/yaml_to_class.pp