From aeb1844e2f997f72da5badcf9177f00dd25c8e4c Mon Sep 17 00:00:00 2001 From: Steven Braverman Date: Thu, 16 Jun 2016 17:25:32 -0700 Subject: [PATCH] Simplifies jinja logic and removes extra lines --- haproxy/init.sls | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/haproxy/init.sls b/haproxy/init.sls index f614841..42fb514 100644 --- a/haproxy/init.sls +++ b/haproxy/init.sls @@ -3,11 +3,10 @@ # Meta-state to fully setup haproxy on debian. (or any other distro that has haproxy in their repo) include: -{% if salt['pillar.get']('haproxy:include') %} -{% for item in salt['pillar.get']('haproxy:include') %} +{%- set haproxy_items = salt['pillar.get']('haproxy:include', []) %} +{%- for item in haproxy_items %} - {{ item }} -{% endfor %} -{% endif %} +{%- endfor %} - haproxy.install - haproxy.service - haproxy.config