Saltstack Official Salt Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526
  1. # -*- coding: utf-8 -*-
  2. # vim: ft=sls
  3. ---
  4. {#- Get the `tplroot` from `tpldir` #}
  5. {%- set tplroot = tpldir.split("/")[0] %}
  6. {%- from tplroot ~ "/map.jinja" import salt_settings with context %}
  7. {%- from tplroot ~ "/map.jinja" import formulas_settings with context %}
  8. {%- set _mapdata = {
  9. "values": {
  10. "salt_settings": salt_settings,
  11. "formulas_settings": formulas_settings,
  12. }
  13. } %}
  14. {%- do salt["log.debug"]("### MAP.JINJA DUMP ###\n" ~ _mapdata | yaml(False)) %}
  15. {%- set output_dir = "/temp" if grains.os_family == "Windows" else "/tmp" %}
  16. {%- set output_file = output_dir ~ "/salt_mapdata_dump.yaml" %}
  17. {{ tplroot }}-mapdata-dump:
  18. file.managed:
  19. - name: {{ output_file }}
  20. - source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja
  21. - template: jinja
  22. - context:
  23. map: {{ _mapdata | yaml }}