Skip to content

Commit

Permalink
Fix issue where empty list of servers would generate a single invalid…
Browse files Browse the repository at this point in the history
… server entry for memcache.yml
  • Loading branch information
JD Huntington & Dennis J. Bell committed Jun 12, 2012
1 parent badf11e commit 10e43aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cookbooks/memcached/templates/default/memcached.yml.erb
Expand Up @@ -21,7 +21,9 @@ defaults:
benchmarking: false
sessions: false
fragments: true
<% unless @server_names.nil? %>
<% if !@server_names.nil? && !@server_names.empty? %>
servers:
- <%= @server_names.join(":11211\n - ") %>:11211
<% @server_names.each do |server_name| %>
- <%= server_name %>:11211
<% end %>
<% end %>

0 comments on commit 10e43aa

Please sign in to comment.