Bechtoldt's Network Saltstack Formula
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

123456789101112131415161718192021
  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 %}