From 109667f3fa369b76640ac12306e214a5a0da661c Mon Sep 17 00:00:00 2001 From: sky-joker Date: Thu, 21 Jan 2021 22:40:13 +0900 Subject: [PATCH] support async in destroy tasks --- .../{{cookiecutter.scenario_name}}/destroy.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/molecule_vmware/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/destroy.yml b/molecule_vmware/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/destroy.yml index 9aa7a7a..da45271 100644 --- a/molecule_vmware/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/destroy.yml +++ b/molecule_vmware/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/destroy.yml @@ -19,5 +19,17 @@ name: "{{ item.name }}" force: true state: absent + async: 7200 + poll: 0 + register: async_results with_items: "{{ molecule_yml.platforms }}" + + - name: Check the test instance creation status + async_status: + jid: "{{ item.ansible_job_id }}" + loop: "{{ async_results.results }}" + register: server + until: server.finished + delay: 10 + retries: 300 {%- endraw %}