From 5851031ad19b8af27ba4f4492519e0157ac901bc Mon Sep 17 00:00:00 2001 From: wadhah101 Date: Thu, 13 Apr 2023 10:09:08 +0200 Subject: [PATCH] group handlers with listen --- .../{{cookiecutter.scenario_name}}/create.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/molecule_plugins/azure/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create.yml b/src/molecule_plugins/azure/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create.yml index bba0bf7f..442919bc 100644 --- a/src/molecule_plugins/azure/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create.yml +++ b/src/molecule_plugins/azure/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/create.yml @@ -67,14 +67,11 @@ until: azure_jobs.finished retries: 300 with_items: "{{ server.results }}" - notify: - - Populate instance config dict - - Convert instance config dict to a list - - Dump instance config - - Wait for SSH + notify: "molecule configuration setup" handlers: - name: Populate instance config dict + listen : "molecule configuration setup" ansible.builtin.set_fact: instance_conf_dict: { @@ -92,16 +89,19 @@ register: instance_config_dict - name: Convert instance config dict to a list + notify: "molecule configuration setup" ansible.builtin.set_fact: instance_conf: "{{ instance_config_dict.results | map(attribute='ansible_facts.instance_conf_dict') | list }}" - name: Dump instance config + notify: "molecule configuration setup" ansible.builtin.copy: content: "{{ instance_conf | to_json | from_json | to_yaml }}" dest: "{{ molecule_instance_config }}" mode: 0664 - name: Wait for SSH + notify: "molecule configuration setup" ansible.builtin.wait_for: port: "{{ ssh_port }}" host: "{{ item.address }}"