Yolanda Robla a258d5b819 Add initial version for puppet-infra-cookiecutter
Change-Id: If704ab696cb5cd4e2b25d885cb1f84b2653f89ce
2015-08-26 09:50:42 +02:00

31 lines
1.0 KiB
Puppet

# == Class: {{cookiecutter.project_name}}::config
#
# This class is used to manage arbitrary {{cookiecutter.project_name}} configurations.
#
# === Parameters
#
# [*{{cookiecutter.project_name}}_config*]
# (optional) Allow configuration of arbitrary {{cookiecutter.project_name}} configurations.
# The value is an hash of {{cookiecutter.project_name}}_config resources. Example:
# { 'DEFAULT/foo' => { value => 'fooValue'},
# 'DEFAULT/bar' => { value => 'barValue'}
# }
# In yaml format, Example:
# {{cookiecutter.project_name}}_config:
# DEFAULT/foo:
# value: fooValue
# DEFAULT/bar:
# value: barValue
#
# NOTE: The configuration MUST NOT be already handled by this module
# or Puppet catalog compilation will fail with duplicate resources.
#
class {{cookiecutter.project_name}}::config (
${{cookiecutter.project_name}}_config = {},
) {
validate_hash(${{cookiecutter.project_name}}_config)
create_resources('{{cookiecutter.project_name}}_config', ${{cookiecutter.project_name}}_config)
}