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

22 行
460B

  1. {%- macro output(key, value) -%}
  2. {%- if value is string -%}
  3. {{key}} = {{value}}
  4. {%- elif value is iterable -%}
  5. {%- for item in value %}
  6. {{key}} = {{item}}
  7. {%- endfor -%}
  8. {%- else -%}
  9. {{key}} = {{value}}
  10. {%- endif -%}
  11. {%- endmacro -%}
  12. [Interface]
  13. {% for key, value in interface.items() -%}
  14. {{ output(key, value) }}
  15. {% endfor -%}
  16. {%- for peer in peers %}
  17. [Peer]
  18. {% for key, value in peer.items() -%}
  19. {{ output(key, value) }}
  20. {% endfor -%}
  21. {%- endfor -%}