Sha256: fd595bb54d445103b2b3dc9d8564fe2aed715d3d82b525100fd655e97bdf4cd4

Contents?: true

Size: 1.35 KB

Versions: 60

Compression:

Stored size: 1.35 KB

Contents

# /etc/haproxy.cfg
#
# Reload gracefully with:
#
# haproxy -f /etc/haproxy.cfg -sf `cat /var/run/haproxy.pid`
#
global
      user <%= haproxy_user %>
      group <%= haproxy_group %>
<% haproxy_global_options.each do |key, values| [values].flatten.each do |value| %>
      <%= key %><% if value && value != true  %> <%= value %><% end %>
<% end end %>

defaults
<% unless haproxy_default_options[:stats_auth].nil? || haproxy_default_options[:stats_auth].empty? %>
      stats enable
      stats auth <%= haproxy_default_options[:stats_auth] %>
<% end %>
<% (haproxy_default_options[:options] || {}).each do |key, values| [values].flatten.each do |value| %>
      <%= key %><% if value && value != true  %> <%= value %><% end %>
<% end end %>

<% haproxy_instances.each_with_index do |instance_ipport, i| %>
<% ipport = instance_ipport.first %>
<% instance = instance_ipport.last %>
listen <%= instance[:name] || "no_name_defined_#{i+1}" %> <%= ipport %>
<% (instance[:options] || {}).each do |key, values| [values].flatten.each do |value| %>
      <%= key %> <%= value %>
<% end end %>
<% unless instance[:stats_auth].nil? || instance[:stats_auth].empty? %>
      stats enable
      stats <%= instance[:stats_auth] %>
<% end %>
<% (instance[:servers] || {}).each do |key, value| %>
      server <%= key %><% if value && value != true  %> <%= value %><% end %>
<% end %>
<% end %>

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
le1t0-deprec-2.1.6.088 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.087 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.086 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.085 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.084 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.083 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.082 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.081 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.080 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.079 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.078 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.077 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.076 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.075 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.074 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.073 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.072 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.071 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.070 lib/deprec/templates/haproxy/haproxy.cfg.erb
le1t0-deprec-2.1.6.069 lib/deprec/templates/haproxy/haproxy.cfg.erb