Bechtoldt's Network Saltstack Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

24 rindas
821B

  1. #!jinja|yaml
  2. {% from "network/defaults.yaml" import rawmap with context %}
  3. {% set datamap = salt['grains.filter_by'](rawmap, merge=salt['pillar.get']('network')) %}
  4. {# TODO: The function name 'routes' in 'network.routes' should be moved into the list as soon as it's possible
  5. for code convention reasons. Unfortunately 'routes' is also used in **kwargs when calling ip.build_routes
  6. in salt.states.network #}
  7. {% for k, v in datamap.routes|default({})|dictsort %}
  8. routes_{{ v.name|default(k) }}:
  9. network.routes:
  10. - name: {{ v.name|default(k) }}
  11. - routes:
  12. {% for net in v.networks %}
  13. - name: {{ net.name }}
  14. ipaddr: {{ net.ipaddr }}
  15. netmask: {{ net.netmask }}
  16. {% if net.gateway is defined %}
  17. gateway: {{ net.gateway }}
  18. {% endif %}
  19. {% endfor %}
  20. {% endfor %}