summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/general/plugins/modules/haproxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/community/general/plugins/modules/haproxy.py')
-rw-r--r--ansible_collections/community/general/plugins/modules/haproxy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ansible_collections/community/general/plugins/modules/haproxy.py b/ansible_collections/community/general/plugins/modules/haproxy.py
index 05f52d55c..cbaa43833 100644
--- a/ansible_collections/community/general/plugins/modules/haproxy.py
+++ b/ansible_collections/community/general/plugins/modules/haproxy.py
@@ -343,7 +343,7 @@ class HAProxy(object):
if state is not None:
self.execute(Template(cmd).substitute(pxname=backend, svname=svname))
- if self.wait:
+ if self.wait and not (wait_for_status == "DRAIN" and state == "DOWN"):
self.wait_until_status(backend, svname, wait_for_status)
def get_state_for(self, pxname, svname):