File: elasticsearch.pp

package info (click to toggle)
puppet-module-cloudkitty 14.0.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,056 kB
  • sloc: ruby: 2,270; python: 38; sh: 10; makefile: 10
file content (35 lines) | stat: -rw-r--r-- 1,334 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
# 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;
  }
}