Bechtoldt's Network Saltstack Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 satır
488B

  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. {% for r in datamap.routes %}
  6. {{ r.name }}:
  7. network.routes:
  8. - name: {{ r.name }}
  9. - routes:
  10. {% for n in r.networks %}
  11. - name: {{ n.name }}
  12. ipaddr: {{ n.ipaddr }}
  13. netmask: {{ n.netmask }}
  14. gateway: {{ n.gateway }}
  15. {% endfor %}
  16. {% endfor %}