Revert "Feature/more modular template"

This commit is contained in:
Forrest 2016-04-07 17:43:00 -07:00
parent e465b79a59
commit 2a6d65e8d5

View file

@ -89,21 +89,13 @@ userlist {{ id }}
#------------------
defaults
log {{ salt['pillar.get']('haproxy:defaults:log', 'global') }}
{%- if 'mode' in salt['pillar.get']('haproxy:defaults', {}) %}
mode {{ salt['pillar.get']('haproxy:defaults:mode', 'http') }}
{%- endif %}
{%- if 'retries' in salt['pillar.get']('haproxy:defaults', {}) %}
retries {{ salt['pillar.get']('haproxy:defaults:retries', '3') }}
{%- endif %}
{%- if 'balance' in salt['pillar.get']('haproxy:defaults', {}) %}
balance {{ salt['pillar.get']('haproxy:defaults:balance', 'roundrobin') }}
{%- endif %}
{%- if 'monitoruri' in salt['pillar.get']('haproxy:defaults', {}) %}
{%- if 'monitoruri' in salt['pillar.get']('haproxy:defaults', {}) -%}
monitor-uri {{ salt['pillar.get']('haproxy:defaults:monitoruri') }}
{%- endif %}
{%- if 'hashtype' in salt['pillar.get']('haproxy:defaults', {}) %}
hash-type {{ salt['pillar.get']('haproxy:defaults:hashtype', 'map-based') }}
{%- endif %}
{%- if 'options' in salt['pillar.get']('haproxy:defaults', {}) -%}
{{- render_list_of_dictionaries('option', salt['pillar.get']('haproxy:defaults:options')) }}
{%- endif %}
@ -283,11 +275,6 @@ listen {{ listener.get('name', listener_name) }}
{%- if 'maxconn' in listener %}
maxconn {{ listener.maxconn }}
{%- endif %}
{%- if 'timeouts' in listener %}
{%- for timeout in listener.timeouts %}
timeout {{ timeout }}
{%- endfor %}
{%- endif %}
{%- if 'options' in listener %}
{%- if listener.options is string %}
option {{ listener.options }}