[Unit] | |||||
Description=Open vSwitch | |||||
Before=network.target | |||||
After=network-pre.target ovsdb-server.service ovs-vswitchd.service | |||||
PartOf=network.target | |||||
Requires=ovsdb-server.service | |||||
Requires=ovs-vswitchd.service | |||||
[Service] | |||||
Type=oneshot | |||||
ExecStart=/usr/bin/ovs-vsctl set open . external-ids:hostname=%H | |||||
ExecReload=/bin/true | |||||
ExecStop=/bin/true | |||||
RemainAfterExit=yes | |||||
[Install] | |||||
WantedBy=multi-user.target | |||||
- require: | - require: | ||||
- pkg: openvswitch_pkgs | - pkg: openvswitch_pkgs | ||||
/etc/systemd/system/openvswitch-switch.service: | |||||
file.managed: | |||||
- source: salt://linux/files/openvswitch-switch.systemd | |||||
- template: jinja | |||||
- require: | |||||
- pkg: openvswitch_pkgs | |||||
module.run: | |||||
- name: service.systemctl_reload | |||||
- onchanges: | |||||
- file: /etc/systemd/system/openvswitch-switch.service | |||||
openvswitch_switch_service: | openvswitch_switch_service: | ||||
service.running: | service.running: | ||||
- name: openvswitch-switch | - name: openvswitch-switch |