2020-07-30 22:05:24 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
|
|
|
---
|
|
|
|
{#- Get the `tplroot` from `tpldir` #}
|
|
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
2020-07-31 10:54:40 +02:00
|
|
|
{%- from tplroot ~ "/map.jinja" import mapdata with context %}
|
2020-07-30 22:05:24 +02:00
|
|
|
|
|
|
|
{%- set output_file = '/tmp/salt_mapdata_dump.yaml' %}
|
|
|
|
|
2020-07-31 10:54:40 +02:00
|
|
|
{%- do salt['log.debug']( mapdata | yaml(False) ) %}
|
2020-07-30 22:05:24 +02:00
|
|
|
|
|
|
|
{{ tplroot }}-mapdata-dump:
|
|
|
|
file.managed:
|
|
|
|
- name: {{ output_file }}
|
|
|
|
- source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja
|
|
|
|
- template: jinja
|
|
|
|
- context:
|
2020-07-31 10:54:40 +02:00
|
|
|
map: {{ mapdata | yaml }}
|