Saltstack Official FirewallD Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

init.sls 675B

12345678910111213141516171819202122
  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 firewalld with context %}
  7. {%- set _mapdata = {
  8. "values": firewalld,
  9. } %}
  10. {%- do salt["log.debug"]("### MAP.JINJA DUMP ###\n" ~ _mapdata | yaml(False)) %}
  11. {%- set output_dir = "/temp" if grains.os_family == "Windows" else "/tmp" %}
  12. {%- set output_file = output_dir ~ "/salt_mapdata_dump.yaml" %}
  13. {{ tplroot }}-mapdata-dump:
  14. file.managed:
  15. - name: {{ output_file }}
  16. - source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja
  17. - template: jinja
  18. - context:
  19. map: {{ _mapdata | yaml }}