Bechtoldt's Network Saltstack Formula
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

22 lines
745B

  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['grains.filter_by'](rawmap, merge=salt['pillar.get']('network')) %}
  5. {# TODO: The function name 'routes' in 'network.routes' should be moved into the list as soon as it's possible
  6. for code convention reasons. Unfortunately 'routes' is also used in **kwargs when calling ip.build_routes
  7. in salt.states.network #}
  8. {% for r in datamap.routes|default([]) %}
  9. routes_{{ r.name }}:
  10. network.routes:
  11. - name: {{ r.name }}
  12. - routes:
  13. {% for n in r.networks %}
  14. - name: {{ n.name }}
  15. ipaddr: {{ n.ipaddr }}
  16. netmask: {{ n.netmask }}
  17. gateway: {{ n.gateway }}
  18. {% endfor %}
  19. {% endfor %}