blob: 474a84c89d6ffa8d8da8168028a51823ac4ff8b1 [file] [log] [blame]
Oleh Hryhorov18a70772018-05-16 14:45:58 +00001{%- from "linux/map.jinja" import network with context %}
2
3{%- if network.get('openvswitch', {}).get('enabled', False) %}
4
5openvswitch_pkgs:
6 pkg.installed:
7 - pkgs: {{ network.ovs_pkgs }}
8
9/etc/default/openvswitch-switch:
10 file.managed:
11 - source: salt://linux/files/openvswitch-switch.default
12 - template: jinja
13 - require:
14 - pkg: openvswitch_pkgs
15
16openvswitch_switch_service:
17 service.running:
18 - name: openvswitch-switch
19 - enable: true
20 {%- if grains.get('noservices') %}
21 - onlyif: /bin/false
22 {%- endif %}
23 - watch:
24 - file: /etc/default/openvswitch-switch
25
26{%- endif %}