From 6bec84cc23e76a0781d8b54c2a530c842c06626b Mon Sep 17 00:00:00 2001 From: Gilles Dartiguelongue Date: Sat, 22 Aug 2015 23:55:56 +0200 Subject: [PATCH] Remove extra whitespaces in generated file --- postfix/files/main.cf | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/postfix/files/main.cf b/postfix/files/main.cf index 07491fe..2fe318e 100644 --- a/postfix/files/main.cf +++ b/postfix/files/main.cf @@ -1,21 +1,20 @@ -{% from "postfix/map.jinja" import postfix with context %} - -{% set config = salt['pillar.get']('postfix:config', {}) -%} -{% set processed_parameters = ['aliases_file', 'virtual'] -%} -{% macro set_parameter(parameter, default=None) -%} -{% set value = config.get(parameter, default) -%} -{% if value is not none -%} - {%- if value is number or value is string %} +{%- from "postfix/map.jinja" import postfix with context -%} +{%- set config = salt['pillar.get']('postfix:config', {}) -%} +{% set processed_parameters = ['aliases_file', 'virtual'] %} +{%- macro set_parameter(parameter, default=None) -%} +{% set value = config.get(parameter, default) %} +{%- if value is not none %} + {%- if value is number or value is string -%} {{ parameter }} = {{ value }} - {%- elif value is iterable %} + {%- elif value is iterable -%} {{ parameter }} = {%- for v in value %} {{ v }}, {%- endfor %} - {%- endif %} -{%- do processed_parameters.append(parameter) -%} -{% endif -%} -{% endmacro -%} + {%- endif -%} +{%- do processed_parameters.append(parameter) %} +{%- endif %} +{%- endmacro -%} # Managed by config management # See /usr/share/postfix/main.cf.dist for a commented, more complete version