Skip to content

Commit

Permalink
add to_i
Browse files Browse the repository at this point in the history
  • Loading branch information
jbdamiano committed May 23, 2017
1 parent 0bf564d commit dba72f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Chef::Log.debug "Installation mode #{node[:elasticsearch][:installation][:mode]}"

if node.elasticsearch[:esmajor] >= 5
if node.elasticsearch[:esmajor].to_i >= 5
default.elasticsearch[:bootstrap][:memory_lock] = node.elasticsearch[:bootstrap][:mlockall]
if node.elasticsearch[:limits][:nofile] < 65536
default.elasticsearch[:limits][:nofile] = 65536
Expand Down
6 changes: 3 additions & 3 deletions templates/default/elasticsearch.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<%= print_value 'index.number_of_replicas' -%>
<%= print_value 'index.auto_expand_replicas' -%>
<%= print_value 'action.auto_create_index' -%>
<% if node.elasticsearch[:esmajor] < 1 %>
<% if node.elasticsearch[:esmajor].to_i < 1 %>
<%= print_value 'action.disable_delete_all_indices' -%>
<% else %>
<%= print_value 'action.destructive_requires_name' -%>
Expand All @@ -54,7 +54,7 @@
################################### Memory ####################################


<% if node.elasticsearch[:esmajor] < 5 %>
<% if node.elasticsearch[:esmajor].to_i < 5 %>
<%= print_value 'bootstrap.mlockall' -%>
<% else %>
<%= print_value 'bootstrap.memory_lock' -%>
Expand Down Expand Up @@ -135,7 +135,7 @@ discovery.ec2.tag.<%= key %>: <%= value %>
################################## Slow Log ###################################


<% if node.elasticsearch[:esmajor] < 5 %>
<% if node.elasticsearch[:esmajor].to_i < 5 %>
<%= print_value 'index.mapper.dynamic' -%>
<%= print_value 'index.search.slowlog.threshold.query.warn' -%>
<%= print_value 'index.search.slowlog.threshold.query.info' -%>
Expand Down

0 comments on commit dba72f3

Please sign in to comment.