Bechtoldt's Network Saltstack Formula
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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