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.

25 line
1.0KB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <service>
  3. {% if 'short' in service %}<short>{{ service.short }}</short>{% else %}<short>{{ name }}</short>{% endif %}
  4. {% if 'description' in service %}<description>{{ service.description }}</description>{% endif %}
  5. {% if 'ports' in service %}
  6. {% if 'tcp' in service.ports %}
  7. {% for v in service.ports.tcp %}<port port="{{ v }}" protocol="tcp" />{% endfor %}
  8. {% endif %}
  9. {% if 'udp' in service.ports %}
  10. {% for v in service.ports.udp %}<port port="{{ v }}" protocol="udp" />{% endfor %}
  11. {% endif %}
  12. {% if 'modules' in service %}
  13. {% for v in service.modules %}<module name="{{ v }}" />{% endfor %}
  14. {% endif %}
  15. {% endif %}
  16. {% if 'destinations' in service %}
  17. {% if 'ipv4' in service.destinations %}
  18. {% for v in service.destinations.ipv4 %}<destination ipv4="{{ v }}" />{% endfor %}
  19. {% endif %}
  20. {% if 'ipv6' in service.destinations %}
  21. {% for v in service.destinations.ipv6 %}<destination ipv6="{{ v }}" />{% endfor %}
  22. {% endif %}
  23. {% endif %}
  24. </service>