Bechtoldt's Network Saltstack 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.

24 lines
543B

  1. #!jinja|yaml
  2. # vim: sts=2 ts=2 sw=2 et ai
  3. #{% from "network/defaults.yaml" import rawmap with context %}
  4. {% set datamap = salt['pillar.get']('network') %}
  5. {% set routes = datamap.routes %}
  6. {% if salt['pillar.get']('network:routes', False) %}
  7. {% for r in routes %}
  8. {{ r.name }}:
  9. network.routes:
  10. - name: {{ r.name }}
  11. - routes:
  12. {% for n in r.networks %}
  13. - name: {{ n.name }}
  14. ipaddr: {{ n.ipaddr }}
  15. netmask: {{ n.netmask }}
  16. gateway: {{ n.gateway }}
  17. {% endfor %}
  18. {% endfor %}
  19. {% endif %}