Defined Type: elasticsearch::pipeline
- Defined in:
- manifests/pipeline.pp
Overview
This define allows you to insert, update or delete Elasticsearch index
ingestion pipelines.
Pipeline content should be defined through the `content` parameter.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'manifests/pipeline.pp', line 47
define elasticsearch::pipeline (
$ensure = 'present',
$api_basic_auth_password = $elasticsearch::api_basic_auth_password,
$api_basic_auth_username = $elasticsearch::api_basic_auth_username,
$api_ca_file = $elasticsearch::api_ca_file,
$api_ca_path = $elasticsearch::api_ca_path,
$api_host = $elasticsearch::api_host,
$api_port = $elasticsearch::api_port,
$api_protocol = $elasticsearch::api_protocol,
$api_timeout = $elasticsearch::api_timeout,
$content = undef,
$validate_tls = $elasticsearch::validate_tls,
) {
if ! defined(Class['elasticsearch']) {
fail('You must include the elasticsearch base class before using defined resources')
}
validate_string(
$api_protocol,
$api_host,
$api_basic_auth_username,
$api_basic_auth_password
)
validate_bool($validate_tls)
if ! ($ensure in ['present', 'absent']) {
fail("'${ensure}' is not a valid 'ensure' parameter value")
}
if ! is_integer($api_port) { fail('"api_port" is not an integer') }
if ! is_integer($api_timeout) { fail('"api_timeout" is not an integer') }
if ($api_ca_file != undef) { validate_absolute_path($api_ca_file) }
if ($api_ca_path != undef) { validate_absolute_path($api_ca_path) }
if $ensure == 'present' { validate_hash($content) }
es_instance_conn_validator { "${name}-ingest-pipeline":
server => $api_host,
port => $api_port,
timeout => $api_timeout,
}
-> elasticsearch_pipeline { $name:
ensure => $ensure,
content => $content,
protocol => $api_protocol,
host => $api_host,
port => $api_port,
timeout => $api_timeout,
username => $api_basic_auth_username,
password => $api_basic_auth_password,
ca_file => $api_ca_file,
ca_path => $api_ca_path,
validate_tls => $validate_tls,
}
}
|