From f6c0474afe97b21a1a721d3bd000706f7c0919db Mon Sep 17 00:00:00 2001
From: Will Szumski <will@stackhpc.com>
Date: Wed, 7 Jul 2021 14:58:49 +0100
Subject: [PATCH] Fix config action when OVN is enabled

Prior to this change, if you generated the config before deploying any
of the OVN services, it would fail on these tasks as the services will
not have been started.

TrivialFix

Change-Id: Ia85ef26015ff341bff1414da039bed52f34e7cc0
---
 ansible/roles/ovn/handlers/main.yml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ansible/roles/ovn/handlers/main.yml b/ansible/roles/ovn/handlers/main.yml
index 42263f16c7..c9714363f9 100644
--- a/ansible/roles/ovn/handlers/main.yml
+++ b/ansible/roles/ovn/handlers/main.yml
@@ -40,6 +40,8 @@
   retries: 10
   delay: 6
   listen: "Restart ovn-nb-db container"
+  when:
+    - kolla_action != "config"
 
 - name: Wait for ovn-sb-db
   wait_for:
@@ -52,6 +54,8 @@
   retries: 10
   delay: 6
   listen: "Restart ovn-sb-db container"
+  when:
+    - kolla_action != "config"
 
 - name: Restart ovn-northd container
   vars: