File tree Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
# vim: ft=sls
3
3
4
- {%- from " template /map.jinja" import template with context % }
5
- {%- from " template /macros.jinja" import files_switch with context % }
4
+ {%- from tpldir ~ " /map.jinja" import template with context % }
5
+ {%- from tpldir ~ " /macros.jinja" import files_switch with context % }
6
6
7
7
include:
8
8
- template.install
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
# vim: ft=sls
3
3
4
- {% from " template /map.jinja" import template with context % }
4
+ {%- from tpldir ~ " /map.jinja" import template with context % }
5
5
6
6
template- pkg:
7
7
pkg.installed:
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
# vim: ft=jinja
3
3
4
- {## Start imports as ##}
5
- {% import_yaml 'template/defaults.yaml' as default_settings %}
6
- {% import_yaml 'template/osfamilymap.yaml' as osfamilymap %}
7
- {% import_yaml 'template/osmap.yaml' as osmap %}
8
- {% import_yaml 'template/osfingermap.yaml' as osfingermap %}
4
+ {#- Get the `topdir` from `tpldir` #}
5
+ {% - set topdir = tpldir .split ('/' )[0] %}
6
+ {#- Start imports as #}
7
+ {% - import_yaml topdir ~ "/defaults.yaml" as default_settings %}
8
+ {% - import_yaml topdir ~ "/osfamilymap.yaml" as osfamilymap %}
9
+ {% - import_yaml topdir ~ "/osmap.yaml" as osmap %}
10
+ {% - import_yaml topdir ~ "/osfingermap.yaml" as osfingermap %}
9
11
10
12
{% set defaults = salt ['grains.filter_by' ](default_settings ,
11
13
default ='template' ,
18
20
)
19
21
) %}
20
22
21
- {## Merge the template pillar # #}
23
+ {#- Merge the template pillar #}
22
24
{% set template = salt ['pillar.get' ]('template' , default =defaults , merge =True ) %}
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
# vim: ft=sls
3
3
4
- {% from " template /map.jinja" import template with context % }
4
+ {%- from tpldir ~ " /map.jinja" import template with context % }
5
5
6
6
include:
7
7
- template.config
You can’t perform that action at this time.
0 commit comments