Files
puppet-cloudkitty/manifests/storage/elasticsearch.pp
Takashi Kajinami 25e2da3b42 Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: I8986bcb5fdd5d1c28aa0e706267f689b894f7167
2023-03-01 16:17:18 +09:00

36 lines
1.3 KiB
Puppet

#
# Class to configure elasticsearch storage
#
# == Parameters
#
# [*host*]
# Elasticsearch host, along with port and protocol. (string value)
# [*index_name*]
# Elasticsearch index to use. (string value)
# [*insecure*]
# Set to true to authorize insecure HTTPS connections to elasticsearch.
# [*cafile*]
# Path of the CA certificate to trust for HTTPS connections (string value).
# [*scroll_duration*]
# Duration (in seconds) for which the ES scroll contexts should be kept
# alive. (interer value)
#
class cloudkitty::storage::elasticsearch(
String $host = $facts['os_service_default'],
String $index_name = $facts['os_service_default'],
Variant[String[0],Boolean] $insecure = $facts['os_service_default'],
String $cafile = $facts['os_service_default'],
Variant[String[0],Integer] $scroll_duration = $facts['os_service_default'],
){
include cloudkitty::deps
cloudkitty_config {
'storage_elasticsearch/host': value => $host;
'storage_elasticsearch/index_name': value => $index_name;
'storage_elasticsearch/insecure': value => $insecure;
'storage_elasticsearch/cafile': value => $cafile;
'storage_elasticsearch/scroll_duration': value => $scroll_duration;
}
}