mirror of
https://github.com/saltstack-formulas/openssh-formula.git
synced 2024-11-28 03:28:09 +01:00
df477b25c2
The `map.jinja` now exports a single variable called `mapdata`. We extract the `openssh`, `sshd_config` and `ssh_config` from it to minimize the changes to `.sls` files.
19 lines
501 B
Plaintext
19 lines
501 B
Plaintext
# -*- coding: utf-8 -*-
|
|
# vim: ft=sls
|
|
---
|
|
{#- Get the `tplroot` from `tpldir` #}
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
|
{%- from tplroot ~ "/map.jinja" import mapdata with context %}
|
|
|
|
{%- set output_file = '/tmp/salt_mapdata_dump.yaml' %}
|
|
|
|
{%- do salt['log.debug']( mapdata | yaml(False) ) %}
|
|
|
|
{{ tplroot }}-mapdata-dump:
|
|
file.managed:
|
|
- name: {{ output_file }}
|
|
- source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja
|
|
- template: jinja
|
|
- context:
|
|
map: {{ mapdata | yaml }}
|