Merge pull request #80 from bawuenet/proxy_map_support

Fix table type for proxy tables
This commit is contained in:
Niels Abspoel 2018-10-21 00:34:45 +02:00 committed by GitHub
commit 1da803467f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -120,7 +120,10 @@ policy-spf_time_limit = {{ policyd_spf.get('time_limit', '3600s') }}
{%- for mapping, data in salt['pillar.get']('postfix:mapping', {}).items() %}
{%- set file_path = salt['pillar.get']('postfix:config:' ~ mapping) %}
{%- if ':' in file_path %}
{%- if file_path.startswith('proxy:') %}
{#- Discard the proxy:-prefix #}
{%- set _, file_type, file_path = file_path.split(':') %}
{%- elif ':' in file_path %}
{%- set file_type, file_path = file_path.split(':') %}
{%- else %}
{%- set file_type = default_database_type %}

View File

@ -76,7 +76,10 @@ postfix_alias_absent_{{ user }}:
{% for mapping, data in salt['pillar.get']('postfix:mapping', {}).items() %}
{%- set need_postmap = False %}
{%- set file_path = salt['pillar.get']('postfix:config:' ~ mapping) %}
{%- if ':' in file_path %}
{%- if file_path.startswith('proxy:') %}
{#- Discard the proxy:-prefix #}
{%- set _, file_type, file_path = file_path.split(':') %}
{%- elif ':' in file_path %}
{%- set file_type, file_path = file_path.split(':') %}
{%- else %}
{%- set file_type = default_database_type %}