I am trying to build a single-node Elasticsearch 6.3 cluster using the puppet-elasticsearch module.
In the past this worked fine when I declared:
elasticsearch::instance { 'es01':
config => {
'index.number_of_replicas' => 0,
...
},
}
This is apparently no longer valid for ES >= 5.x
Accordingly I tried this:
elasticsearch::template { 'templatename':
source => 'puppet:///path/to/template.json',
}
And my template has:
{
"settings": {
"index": {
"number_of_replicas": 0
}
}
}
(Amongst other stuff.)
That still doesn't work, and my cluster comes up in yellow state, and I can fix it on the command line using:
curl -XPUT 0.0.0.0:9200/_all/_settings -H'Content-Type: application/json' -d '{"index.number_of_replicas":0}'
If someone can tell me what I'm doing wrong it would be much appreciated.