diff options
Diffstat (limited to 'sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_1_setup_elasticsearch.rb')
-rw-r--r-- | sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_1_setup_elasticsearch.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_1_setup_elasticsearch.rb b/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_1_setup_elasticsearch.rb index 68c1154ec6..f32e736f53 100644 --- a/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_1_setup_elasticsearch.rb +++ b/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_1_setup_elasticsearch.rb @@ -1,3 +1,10 @@ +elasticsearch_list = '' + +node['Nodes']['ES'].each do |item| + elasticsearch_list += "- " + item + ":9300\n" +end + + template "/usr/share/elasticsearch/config/elasticsearch.yml" do source "ES-elasticsearch.yml.erb" owner "elasticsearch" @@ -6,7 +13,8 @@ template "/usr/share/elasticsearch/config/elasticsearch.yml" do variables({ :cluster_name => node['elasticsearch'][:cluster_name]+node.chef_environment, :node_name => node[:hostname], - :ES_IP => node['Nodes']['ES'], + :es_ip_list => "#{elasticsearch_list}", + :es_ip_list_XXX => node['Nodes']['ES'], :num_of_shards => node['elasticsearch'][:num_of_shards], :num_of_replicas => node['elasticsearch'][:num_of_replicas] }) |