Skip to content

Commit 2987e67

Browse files
committed
feat(map_jinja): allow working with filenames other than map.jinja
1 parent d13eb63 commit 2987e67

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ssf/defaults.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ ssf_node_anchors:
132132
driver:
133133
run_options: {}
134134
map_jinja:
135+
filename: 'map.jinja'
135136
verification: {}
136137
platforms:
137138
# Could use `opensuse-leap` throughout since `/` never used at this end

ssf/files/default/formula/_mapdata/init.sls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ ${ '# vim: ft=sls' }
33
---
44
{#- Get the `tplroot` from `tpldir` #}
55
{%- set tplroot = tpldir.split('/')[0] %}
6+
<% filename = map_jinja['filename'] %>\
67
<% import_var = map_jinja['verification']['import'] %>\
78
<% import_var_as = '' if import_var == 'mapdata' else ' as mapdata' %>\
8-
{%- from tplroot ~ "/map.jinja" import ${ import_var }${ import_var_as } with context %}
9+
{%- from tplroot ~ "/${ filename }" import ${ import_var }${ import_var_as } with context %}
910
1011
{%- do salt['log.debug']('### MAP.JINJA DUMP ###\n' ~ mapdata | yaml(False)) %}
1112

0 commit comments

Comments
 (0)