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