puppet-sahara/manifests/config.pp
ZhongShengping 00dac9470a Add the capability to configure api-paste.ini with config.pp
Already added type/provider for paste configs,
but it wouldn't to patch sahara::config.

Change-Id: Iba618f27b110192c1751486681d77c1c9d46c541
2016-02-19 03:37:42 +08:00

37 lines
1.0 KiB
Puppet

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