From 1231ddcbff276a173a0654088423d86a6f5194f9 Mon Sep 17 00:00:00 2001 From: Joe Talerico Date: Tue, 17 May 2016 16:00:00 -0400 Subject: [PATCH] Adding ovsdb to controller metadata Adding this to controllers too Change-Id: Icbc198e20f6508e9a80303e06235940004268a16 --- ansible/gather/roles/neutron/tasks/main.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ansible/gather/roles/neutron/tasks/main.yml b/ansible/gather/roles/neutron/tasks/main.yml index 73bdd9ab1..ab57afe3d 100644 --- a/ansible/gather/roles/neutron/tasks/main.yml +++ b/ansible/gather/roles/neutron/tasks/main.yml @@ -99,3 +99,18 @@ - name: Set ovs version fact set_fact: openstack_ovs_version: "{{ ovs_version.stdout }}" + + - name: Get neutron ovs agent ovsdb setting + shell: crudini --get /etc/neutron/plugins/ml2/openvswitch_agent.ini ovs ovsdb_interface + register: ovsdb_status + ignore_errors: true + + - name: Set Neutron OVS ovsdb fact + set_fact: + openstack_neutron_ovsdb: "{{ ovsdb_status.stdout }}" + when: (ovsdb_status.stdout.find('native') != -1 or ovsdb_status.stdout.find('vsctl') != -1) + + - name: Set Neutron OVS ovsdb fact + set_fact: + openstack_neutron_ovsdb: "vsctl" + when: (ovsdb_status.stdout.find('native') == -1 and ovsdb_status.stdout.find('vsctl') == -1)