Puppet - 使用Elasticsearch模块指定实例数据路径时出错

时间:2016-10-10 01:22:19

标签: elasticsearch puppet

使用elasticsearch-elasticsearch 0.13.2(最新)

这里的清单:

class profiles::elastic_graylog (
  $instance_config = hiera_hash(elasticsearch_config_gray),
  $config_hash = hiera_hash(elasticsearch_config,undef)
){
  class {'elasticsearch':
    manage_repo  => true,
    version      => '2.3.2',
    repo_version => '2.x',
    java_install => false,
    config       => $config_hash,
  }
  elasticsearch::instance {'gray': config => $instance_config }
}

例如hiera哈希:

elasticsearch_config_gray:
  path.data: '/opt/elasticsearch-data/gray'

主哈希的编辑版本:

elasticsearch_config:
  ES_HEAP_SIZE: '2g'
  cluster.name:  'gray_es_cluster'
  node.name:  "%{::hostname}"
  http.cors.enabled:  true
  http.cors.allow-origin: '"/.*/"'
  network.host:  '0.0.0.0'
  discovery.zen.ping.multicast.enabled:  false
  discovery.zen.ping.unicast.hosts:
    - 'xxxxxx'
  indices.fielddata.cache.size:  '25%'
  indices.store.throttle.max_bytes_per_sec:  '150mb'
  cluster.routing.allocation.disk.threshold_enabled: True
  cluster.routing.allocation.disk.watermark.low: '15gb'
  cluster.routing.allocation.disk.watermark.high: '10gb'
  datadir:  '/opt/elasticsearch-data/gray'
  path.data: '/opt/elasticsearch-data/gray'

但是这没有正确设置path.data:

grep path /etc/elasticsearch/gray/elasticsearch.yml
path.data: "/usr/share/elasticsearch/data/gray"

我已经尝试将path.data添加到主哈希(如上所述),但没有成功。

0 个答案:

没有答案