puppet-congress/manifests/config.pp
ZhongShengping 0e5b333b88 Add api_paste type/provider for congress
Add congress_api_paste_ini type/provider for congress.
Also add the capability to configure api-paste.ini with config.pp.

Change-Id: Ifb7150fb383636efa0dc76a68bafdfd70ee623cb
Closes-Bug: #1483371
2017-07-26 11:31:56 +08:00

39 lines
1.1 KiB
Puppet

# == Class: congress::config
#
# This class is used to manage arbitrary congress configurations.
#
# === Parameters
#
# [*congress_config*]
# (optional) Allow configuration of arbitrary congress configurations.
# The value is an hash of congress_config resources. Example:
# { 'DEFAULT/foo' => { value => 'fooValue'},
# 'DEFAULT/bar' => { value => 'barValue'}
# }
# In yaml format, Example:
# congress_config:
# DEFAULT/foo:
# value: fooValue
# DEFAULT/bar:
# value: barValue
#
# [*congress_api_paste_ini*]
# (optional) Allow configuration of /etc/congress/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 congress::config (
$congress_config = {},
$congress_api_paste_ini = {},
) {
include ::congress::deps
validate_hash($congress_config)
validate_hash($congress_api_paste_ini)
create_resources('congress_config', $congress_config)
create_resources('congress_api_paste_ini', $congress_api_paste_ini)
}