From 113d29ffeb119e6a11560b4bef33665d90b997b9 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Thu, 9 Jul 2015 16:49:10 -0400 Subject: [PATCH] Fix variable access warnings Change-Id: I70403b12ba86f6bd8106acd342bfa3f1806a3632 Signed-off-by: Paul Belanger --- templates/elasticsearch.default.erb | 2 +- templates/elasticsearch.yml.erb | 56 ++++++++++++++--------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/templates/elasticsearch.default.erb b/templates/elasticsearch.default.erb index 97ca450..2fd5a26 100644 --- a/templates/elasticsearch.default.erb +++ b/templates/elasticsearch.default.erb @@ -3,7 +3,7 @@ #ES_GROUP=elasticsearch # Heap Size (defaults to 256m min, 1g max) -ES_HEAP_SIZE=<%= heap_size %> +ES_HEAP_SIZE=<%= @heap_size %> # Heap new generation #ES_HEAP_NEWSIZE= diff --git a/templates/elasticsearch.yml.erb b/templates/elasticsearch.yml.erb index 48f4e7a..606332f 100644 --- a/templates/elasticsearch.yml.erb +++ b/templates/elasticsearch.yml.erb @@ -86,11 +86,11 @@ node.name: "<%= scope.lookupvar("::hostname") %>" # to disable it, set the following: # node.max_local_storage_nodes: 1 -<% if es_template_config.has_key?('node.master') then -%> -node.master: <%= es_template_config['node.master'] %> +<% if @es_template_config.has_key?('node.master') then -%> +node.master: <%= @es_template_config['node.master'] %> <% end -%> -<% if es_template_config.has_key?('node.data') then -%> -node.data: <%= es_template_config['node.data'] %> +<% if @es_template_config.has_key?('node.data') then -%> +node.data: <%= @es_template_config['node.data'] %> <% end -%> @@ -109,16 +109,16 @@ node.data: <%= es_template_config['node.data'] %> # Set the number of shards (splits) of an index (5 by default): # -<% if es_template_config.has_key?('index.number_of_shards') then -%> -index.number_of_shards: <%= es_template_config['index.number_of_shards'] %> +<% if @es_template_config.has_key?('index.number_of_shards') then -%> +index.number_of_shards: <%= @es_template_config['index.number_of_shards'] %> <% else -%> # index.number_of_shards: 5 <% end -%> # Set the number of replicas (additional copies) of an index (1 by default): # -<% if es_template_config.has_key?('index.number_of_replicas') then -%> -index.number_of_replicas: <%= es_template_config['index.number_of_replicas'] %> +<% if @es_template_config.has_key?('index.number_of_replicas') then -%> +index.number_of_replicas: <%= @es_template_config['index.number_of_replicas'] %> <% else -%> # index.number_of_replicas: 1 <% end -%> @@ -150,14 +150,14 @@ index.number_of_replicas: <%= es_template_config['index.number_of_replicas'] %> # Use the Index Status API () to inspect # the index status. -<% if es_template_config.has_key?('index.store.compress.stored') then -%> -index.store.compress.stored: <%= es_template_config['index.store.compress.stored'] %> +<% if @es_template_config.has_key?('index.store.compress.stored') then -%> +index.store.compress.stored: <%= @es_template_config['index.store.compress.stored'] %> <% end -%> -<% if es_template_config.has_key?('index.store.compress.tv') then -%> -index.store.compress.tv: <%= es_template_config['index.store.compress.tv'] %> +<% if @es_template_config.has_key?('index.store.compress.tv') then -%> +index.store.compress.tv: <%= @es_template_config['index.store.compress.tv'] %> <% end -%> -<% if es_template_config.has_key?('indices.memory.index_buffer_size') then -%> -indices.memory.index_buffer_size: "<%= es_template_config['indices.memory.index_buffer_size'] %>" +<% if @es_template_config.has_key?('indices.memory.index_buffer_size') then -%> +indices.memory.index_buffer_size: "<%= @es_template_config['indices.memory.index_buffer_size'] %>" <% end -%> #################################### Paths #################################### @@ -203,8 +203,8 @@ indices.memory.index_buffer_size: "<%= es_template_config['indices.memory.index_ # # Set this property to true to lock the memory: # -<% if es_template_config.has_key?('bootstrap.mlockall') then -%> -bootstrap.mlockall: <%= es_template_config['bootstrap.mlockall'] %> +<% if @es_template_config.has_key?('bootstrap.mlockall') then -%> +bootstrap.mlockall: <%= @es_template_config['bootstrap.mlockall'] %> <% else -%> # bootstrap.mlockall: true <% end -%> @@ -278,8 +278,8 @@ bootstrap.mlockall: <%= es_template_config['bootstrap.mlockall'] %> # Allow recovery process after N nodes in a cluster are up: # -<% if es_template_config.has_key?('gateway.recover_after_nodes') then -%> -gateway.recover_after_nodes: <%= es_template_config['gateway.recover_after_nodes'] %> +<% if @es_template_config.has_key?('gateway.recover_after_nodes') then -%> +gateway.recover_after_nodes: <%= @es_template_config['gateway.recover_after_nodes'] %> <% else -%> # gateway.recover_after_nodes: 1 <% end -%> @@ -287,8 +287,8 @@ gateway.recover_after_nodes: <%= es_template_config['gateway.recover_after_nodes # Set the timeout to initiate the recovery process, once the N nodes # from previous setting are up (accepts time value): # -<% if es_template_config.has_key?('gateway.recover_after_time') then -%> -gateway.recover_after_time: <%= es_template_config['gateway.recover_after_time'] %> +<% if @es_template_config.has_key?('gateway.recover_after_time') then -%> +gateway.recover_after_time: <%= @es_template_config['gateway.recover_after_time'] %> <% else -%> # gateway.recover_after_time: 5m <% end -%> @@ -297,8 +297,8 @@ gateway.recover_after_time: <%= es_template_config['gateway.recover_after_time'] # are up (and recover_after_nodes is met), begin recovery process immediately # (without waiting for recover_after_time to expire): # -<% if es_template_config.has_key?('gateway.expected_nodes') then -%> -gateway.expected_nodes: <%= es_template_config['gateway.expected_nodes'] %> +<% if @es_template_config.has_key?('gateway.expected_nodes') then -%> +gateway.expected_nodes: <%= @es_template_config['gateway.expected_nodes'] %> <% else -%> # gateway.expected_nodes: 2 <% end -%> @@ -339,8 +339,8 @@ gateway.expected_nodes: <%= es_template_config['gateway.expected_nodes'] %> # operational within the cluster. Set this option to a higher value (2-4) # for large clusters (>3 nodes): # -<% if es_template_config.has_key?('discovery.zen.minimum_master_nodes') then -%> -discovery.zen.minimum_master_nodes: <%= es_template_config['discovery.zen.minimum_master_nodes'] %> +<% if @es_template_config.has_key?('discovery.zen.minimum_master_nodes') then -%> +discovery.zen.minimum_master_nodes: <%= @es_template_config['discovery.zen.minimum_master_nodes'] %> <% else -%> # discovery.zen.minimum_master_nodes: 1 <% end -%> @@ -360,8 +360,8 @@ discovery.zen.minimum_master_nodes: <%= es_template_config['discovery.zen.minimu # # 1. Disable multicast discovery (enabled by default): # -<% if es_template_config.has_key?('discovery.zen.ping.multicast.enabled') then -%> -discovery.zen.ping.multicast.enabled: <%= es_template_config['discovery.zen.ping.multicast.enabled'] %> +<% if @es_template_config.has_key?('discovery.zen.ping.multicast.enabled') then -%> +discovery.zen.ping.multicast.enabled: <%= @es_template_config['discovery.zen.ping.multicast.enabled'] %> <% else -%> # discovery.zen.ping.multicast.enabled: false <% end -%> @@ -371,8 +371,8 @@ discovery.zen.ping.multicast.enabled: <%= es_template_config['discovery.zen.ping # # discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"] # -<% if es_template_config.has_key?('discovery.zen.ping.unicast.hosts') then -%> -discovery.zen.ping.unicast.hosts: ["<%= es_template_config['discovery.zen.ping.unicast.hosts'].join("\", \"") %>"] +<% if @es_template_config.has_key?('discovery.zen.ping.unicast.hosts') then -%> +discovery.zen.ping.unicast.hosts: ["<%= @es_template_config['discovery.zen.ping.unicast.hosts'].join("\", \"") %>"] <% end -%> # EC2 discovery allows to use AWS EC2 API in order to perform discovery.