1 # -*- coding: utf-8 -*-
4 {#- Get the `tplroot` from `tpldir` #}
5 {%- set tplroot = tpldir.split('/')[0] %}
6 {#- Start imports as #}
7 {%- import_yaml tplroot ~ "/defaults.yaml" as default_settings %}
8 {%- import_yaml tplroot ~ "/osarchmap.yaml" as osarchmap %}
9 {%- import_yaml tplroot ~ "/osfamilymap.yaml" as osfamilymap %}
10 {%- import_yaml tplroot ~ "/osmap.yaml" as osmap %}
11 {%- import_yaml tplroot ~ "/osfingermap.yaml" as osfingermap %}
13 {#- Retrieve the config dict only once #}
14 {%- set _config = salt['config.get'](tplroot, default={}) %}
16 {%- set defaults = salt['grains.filter_by'](
19 merge=salt['grains.filter_by'](
22 merge=salt['grains.filter_by'](
25 merge=salt['grains.filter_by'](
28 merge=salt['grains.filter_by'](
31 merge=salt['grains.filter_by'](
42 {%- set config = salt['grains.filter_by'](
43 {'defaults': defaults},
49 {#- Change **TEMPLATE** to match with your formula's name and then remove this line #}
50 {%- set TEMPLATE = config %}
52 {#- Post-processing for specific non-YAML customisations #}
53 {%- if grains.os == 'MacOS' %}
54 {%- set macos_group = salt['cmd.run']("stat -f '%Sg' /dev/console") %}
55 {%- do TEMPLATE.update({'rootgroup': macos_group}) %}