mirror of
https://github.com/saltstack-formulas/sudoers-formula.git
synced 2024-12-01 02:05:40 +01:00
22 lines
571 B
Plaintext
22 lines
571 B
Plaintext
|
# -*- coding: utf-8 -*-
|
||
|
# vim: ft=sls
|
||
|
---
|
||
|
{#- Get the `tplroot` from `tpldir` #}
|
||
|
{%- set tplroot = tpldir.split('/')[0] %}
|
||
|
{%- from tplroot ~ "/map.jinja" import sudoers with context %}
|
||
|
|
||
|
{%- set map = {
|
||
|
'sudoers': sudoers,
|
||
|
} %}
|
||
|
{%- do salt['log.debug']('### MAP.JINJA DUMP ###\n' ~ map | yaml(False)) %}
|
||
|
|
||
|
{%- set output_file = '/tmp/salt_mapdata_dump.yaml' %}
|
||
|
|
||
|
{{ tplroot }}-mapdata-dump:
|
||
|
file.managed:
|
||
|
- name: {{ output_file }}
|
||
|
- source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja
|
||
|
- template: jinja
|
||
|
- context:
|
||
|
map: {{ map | yaml }}
|