Add template support for the path.data

Also ensure the directory exists and is owned by elasticsearch if
specified.

Change-Id: I501d5995acc018d8e27a0a216609b4d4ed138864
This commit is contained in:
K Jonathan Harker 2015-05-22 15:40:12 -07:00
parent b990d859d2
commit 57c667dd6b
2 changed files with 11 additions and 0 deletions

View File

@ -81,6 +81,14 @@ class elasticsearch (
]
}
if 'path.data' in $es_template_config {
file { $es_template_config['path.data']:
ensure => directory,
owner => 'elasticsearch',
require => Package['elasticsearch'],
}
}
file { '/etc/elasticsearch':
ensure => directory,
owner => 'root',

View File

@ -175,6 +175,9 @@ indices.memory.index_buffer_size: "<%= es_template_config['indices.memory.index_
# space on creation. For example:
#
# path.data: /path/to/data1,/path/to/data2
<% if es_template_config.has_key?('path.data') then -%>
path.data: "<%= es_template_config['path.data'] %>"
<% end -%>
# Path to temporary files:
#