mirror of
https://github.com/saltstack-formulas/sysctl-formula.git
synced 2026-08-30 01:52:19 +02:00
test: standardise use of share suite & _mapdata state [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/302
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=sls
|
||||
---
|
||||
{#- Get the `tplroot` from `tpldir` #}
|
||||
{%- set tplroot = tpldir.split("/")[0] %}
|
||||
{%- from tplroot ~ "/map.jinja" import sysctl_settings with context %}
|
||||
|
||||
{%- set _mapdata = {
|
||||
"values": sysctl_settings,
|
||||
} %}
|
||||
{%- do salt["log.debug"]("### MAP.JINJA DUMP ###\n" ~ _mapdata | yaml(False)) %}
|
||||
|
||||
{%- set output_dir = "/temp" if grains.os_family == "Windows" else "/tmp" %}
|
||||
{%- set output_file = output_dir ~ "/salt_mapdata_dump.yaml" %}
|
||||
|
||||
{{ tplroot }}-mapdata-dump:
|
||||
file.managed:
|
||||
- name: {{ output_file }}
|
||||
- source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja
|
||||
- template: jinja
|
||||
- context:
|
||||
map: {{ _mapdata | yaml }}
|
||||
Reference in New Issue
Block a user