puppet-openstack-cookiecutter/puppet-{{cookiecutter.project_name}}/manifests/config.pp
Takashi Kajinami 926fed1836 replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

This also adds the type enforcement about purge_config which accepts
only boolean values.

Change-Id: I243572f19564a18003c3de66c1248f0f215bae65
2023-08-07 10:12:29 +09: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 (
Hash ${{cookiecutter.project_name}}_config = {},
) {
include {{cookiecutter.project_name}}::deps
create_resources('{{cookiecutter.project_name}}_config', ${{cookiecutter.project_name}}_config)
}