Skip to content

Commit 34a112f

Browse files
committed
fix: make necessary modifications to get working on salt-ssh
* Similar situation to saltstack-formulas/logrotate-formula#53 - https://freenode.logbot.info/saltstack-formulas/20200507#c3819526-c3819581 - https://freenode.logbot.info/saltstack-formulas/20200508#c3826763-c3826995 * Send template values by `context`
1 parent b64102f commit 34a112f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

postfix/config.sls

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ include:
2121
- watch_in:
2222
- service: postfix
2323
- template: jinja
24+
- context:
25+
postfix: {{ postfix|tojson }}
2426
2527
{% if 'vmail' in pillar.get('postfix', '') %}
2628
{{ postfix.config_path }}/virtual_alias_maps.cf:
@@ -61,6 +63,7 @@ include:
6163
{% endif %}
6264
6365
{% if salt['pillar.get']('postfix:manage_master_config', True) %}
66+
{% import_yaml "postfix/services.yaml" as postfix_master_services %}
6467
{{ postfix.config_path }}/master.cf:
6568
file.managed:
6669
- source: salt://postfix/files/master.cf
@@ -72,6 +75,9 @@ include:
7275
- watch_in:
7376
- service: postfix
7477
- template: jinja
78+
- context:
79+
postfix: {{ postfix|tojson }}
80+
postfix_master_services: {{ postfix_master_services|tojson }}
7581
{% endif %}
7682
7783
{% if 'transport' in pillar.get('postfix', '') %}

postfix/files/main.cf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{%- from "postfix/map.jinja" import postfix with context -%}
21
{%- set config = salt['pillar.get']('postfix:config', {}) -%}
32

43
{#- " | list": Python3.6 retuns dict_keys here, which needs to be converted into a list here. -#}

postfix/files/master.cf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
{%- from "postfix/map.jinja" import postfix with context -%}
21
{%- set master_config = salt['pillar.get']('postfix:master_config', {}) -%}
3-
{% import_yaml "postfix/services.yaml" as postfix_master_services %}
4-
52
{#-
63
# Handle the case that the pillar data does not provide any service
74
# configuration but submission parameters are provided in the pillar.

0 commit comments

Comments
 (0)