Bechtoldt's Network Saltstack Formula
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

21 líneas
716B

  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 r in datamap.routes|default([]) %}
  8. routes_{{ 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 %}