Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9125317
script.pp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
script.pp
View Options
# This define allows you to insert, update or delete scripts that are used
# within Elasticsearch.
#
# @param ensure
# Controls the state of the script file resource to manage.
# Values are simply passed through to the `file` resource.
#
# @param recurse
# Will be passed through to the script file resource.
#
# @param source
# Puppet source of the script
#
# @author Richard Pijnenburg <richard.pijnenburg@elasticsearch.com>
# @author Tyler Langlois <tyler.langlois@elastic.co>
#
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'
,
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 21, 8:29 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3368831
Attached To
R150 puppet-elastic-elasticsearch
Event Timeline
Log In to Comment