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.

17 rindas
540B

  1. {% from "network/defaults.yaml" import rawmap with context %}
  2. {% set datamap = salt['grains.filter_by'](rawmap, merge=salt['pillar.get']('network:lookup')) %}
  3. {% set hosts = datamap['hosts']['def_entries'] %}
  4. {% if salt['pillar.get']('network:hosts', False) %}
  5. {% set hosts = hosts + salt['pillar.get']('network:hosts') %}
  6. {% endif %}
  7. {% for h in hosts %}
  8. host-{{ h['name'] }}_{{ h['ip'] }}:
  9. host:
  10. - {{ h['ensure']|default(datamap['hosts']['values']['ensure']) }}
  11. - ip: {{ h['ip'] }}
  12. - name: {{ h['name'] }}
  13. {% endfor %}