Defined Type: elasticsearch::script
- Defined in:
- manifests/script.pp
Overview
This define allows you to insert, update or delete scripts that are used
within Elasticsearch.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'manifests/script.pp', line 17
define elasticsearch::script (
String $source,
String $ensure = 'present',
Optional[Variant[Boolean, Enum['remote']]] $recurse = undef,
) {
if ! defined(Class['elasticsearch']) {
fail('You must include the elasticsearch base class before using defined resources')
}
$filename_array = split($source, '/')
$basefilename = $filename_array[-1]
file { "${elasticsearch::homedir}/scripts/${basefilename}":
ensure => $ensure,
source => $source,
owner => $elasticsearch::elasticsearch_user,
group => $elasticsearch::elasticsearch_group,
recurse => $recurse,
mode => '0644',
}
}
|