Last active
August 12, 2020 12:58
-
-
Save skinny/6542ee1d42b4f1c7d095134bbdf51b02 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stationmap.yaml : | |
'1815-1991-7288-3225-9558-4541-07': | |
station-id: 19 | |
organizationunit-id: 15 | |
country-id: 'NL' | |
map.jinja : | |
{%- set tplroot = tpldir.split('/')[0] %} | |
{%- import_yaml tpldir + "/stationmap.yaml" as stationmap %} | |
{%- set station = salt['grains.filter_by']( | |
stationmap, | |
grain='serialnumber', | |
default='1815-1991-7288-3225-9558-4541-07' | |
) | |
%} | |
init.sls : | |
{% from tpldir + "/map.jinja" import station with context %} | |
/etc/eva/station.conf: | |
file.managed: | |
- makedirs: True | |
- source: salt://config/station.conf | |
- context: | |
station: station | |
- mode: 644 | |
- template: jinja | |
station.conf: | |
{{ station['country-id'] }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment