From bb455cb1d660cdf6bbe98fd95e47f68fe218fc4e Mon Sep 17 00:00:00 2001 From: davidBMSTU Date: Fri, 25 Oct 2024 19:06:29 +0300 Subject: [PATCH] ansible-core 2.14 and higher bug fix, now they are supported --- setup.cfg | 2 +- src/cotea/wrappers/get_next_task_wrapper.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index fb4460e..0ffb23e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = cotea -version = 1.3.17 +version = 1.3.19 author = David Badalyan author_email = dbadalyan@ispras.ru description = Tool that provides Python API to run Ansible programmatically. diff --git a/src/cotea/wrappers/get_next_task_wrapper.py b/src/cotea/wrappers/get_next_task_wrapper.py index bc6097c..6609aa5 100644 --- a/src/cotea/wrappers/get_next_task_wrapper.py +++ b/src/cotea/wrappers/get_next_task_wrapper.py @@ -161,6 +161,9 @@ def add_tasks(self, new_tasks): for host in hosts_left: self.play_iterator.add_tasks(host, new_tasks) + if hasattr(self.play_iterator, "all_tasks"): + self.play_iterator.all_tasks.extend(new_tasks) + return True, "" error_msg = "Some of the needed objects are None. Most likely "