From e215f842bab59b15bfbe64dd5409cc1d4a27dbd5 Mon Sep 17 00:00:00 2001 From: Ryan Reed <6673689+rreed42@users.noreply.github.com> Date: Fri, 27 Jul 2018 01:12:34 -0400 Subject: [PATCH] Correcting conditionals looping (#43331) Empty conditionals would not break out of the loop, causing every command to be run for the same number of times as retries is defined (10 by default) --- lib/ansible/modules/network/vyos/vyos_command.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/network/vyos/vyos_command.py b/lib/ansible/modules/network/vyos/vyos_command.py index 207b9eda676..119efa924c4 100644 --- a/lib/ansible/modules/network/vyos/vyos_command.py +++ b/lib/ansible/modules/network/vyos/vyos_command.py @@ -212,10 +212,10 @@ def main(): break conditionals.remove(item) - if not conditionals: - break + if not conditionals: + break - time.sleep(interval) + time.sleep(interval) if conditionals: failed_conditions = [item.raw for item in conditionals]