Skip to content

Commit

Permalink
Merge pull request saltstack-formulas#49 from myii/bug/fix-files_swit…
Browse files Browse the repository at this point in the history
…ch-call

fix(tofs): use `tpldir` derivative `topdir` for pillar (config) paths
  • Loading branch information
myii authored Feb 25, 2019
2 parents 0fabb21 + 5e9df00 commit 2ffd36e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion template/config.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

{%- set topdir = tpldir.split('/')[0] %}
{%- from tpldir ~ "/map.jinja" import template with context %}
{%- from tpldir ~ "/macros.jinja" import files_switch with context %}
Expand All @@ -12,7 +13,7 @@ template-config:
- name: {{ template.config }}
- source: {{ files_switch(
salt['config.get'](
tpldir ~ ':tofs:files:template-config',
topdir ~ ':tofs:files:template-config',
['example.tmpl', 'example.tmpl.jinja']
)
) }}
Expand Down

0 comments on commit 2ffd36e

Please sign in to comment.