Bechtoldt's Network Saltstack Formula
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

21 行
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 %}