Create ovs temp directories when using ovs

This change creates a tmpfiles file and related directories when using
any "ovs" based plugin.

Change-Id: I616880bc6883eacb8393bbcaabaccccdd2665200
Closes-Bug: #1754144
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-03-07 15:24:02 -06:00 committed by Kevin Carter (cloudnull)
parent 3db2ebb1b6
commit 7ba9b76382

View File

@ -51,6 +51,22 @@
notify:
- Restart neutron services
- name: Create ovs tempfiles directory
block:
- name: Create ovs tmpfiles file
lineinfile:
dest: "/etc/tmpfiles.d/openstack-openvswitch.conf"
line: "D /var/run/openvswitch 2755 root root"
create: true
- name: Create ovs tmp directory
file:
path: "/var/run/openvswitch"
state: directory
mode: "02755"
when:
- "'ovs' in neutron_plugin_type | lower"
- name: Place the systemd init script
config_template:
src: "neutron-systemd-init.j2"