diff --git a/manifests/init.pp b/manifests/init.pp index 31fb248..6860bda 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -65,6 +65,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', diff --git a/templates/elasticsearch.yml.erb b/templates/elasticsearch.yml.erb index 07c7c28..c89974d 100644 --- a/templates/elasticsearch.yml.erb +++ b/templates/elasticsearch.yml.erb @@ -178,6 +178,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: #