Saltstack Official Linux 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.

38 rindas
950B

  1. {%- from "linux/map.jinja" import network with context %}
  2. {%- if network.get('openvswitch', {}).get('enabled', False) %}
  3. openvswitch_pkgs:
  4. pkg.installed:
  5. - pkgs: {{ network.ovs_pkgs | json }}
  6. /etc/default/openvswitch-switch:
  7. file.managed:
  8. - source: salt://linux/files/openvswitch-switch.default
  9. - template: jinja
  10. - require:
  11. - pkg: openvswitch_pkgs
  12. /etc/systemd/system/openvswitch-switch.service:
  13. file.managed:
  14. - source: salt://linux/files/openvswitch-switch.systemd
  15. - template: jinja
  16. - require:
  17. - pkg: openvswitch_pkgs
  18. module.run:
  19. - name: service.systemctl_reload
  20. - onchanges:
  21. - file: /etc/systemd/system/openvswitch-switch.service
  22. openvswitch_switch_service:
  23. service.running:
  24. - name: openvswitch-switch
  25. - enable: true
  26. {%- if grains.get('noservices') %}
  27. - onlyif: /bin/false
  28. {%- endif %}
  29. - watch:
  30. - file: /etc/default/openvswitch-switch
  31. {%- endif %}