--- /dev/null
+---
+
+# Copyright 2019 Nokia
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: Modify ovs agent datapath_type
+ ini_file: dest=/etc/neutron/plugins/ml2/openvswitch_agent.ini section=ovs option=datapath_type value=netdev backup=no
+ register: datapath_result
+
+- name: Modify ovs agent vhostuser_socket_dir
+ ini_file: dest=/etc/neutron/plugins/ml2/openvswitch_agent.ini section=ovs option=vhostuser_socket_dir value=/var/run/openvswitch backup=no
+ register: socketdir_result
+
+- name: Restart neutron openvswitch agent
+ systemd:
+ name: neutron-openvswitch-agent
+ state: "restarted"
+ when: datapath_result.changed or socketdir_result.changed