How to get the ID of EC2 instance created with Ansible playbook

I succeeded in creating an EC2 instance by using the ansible.playbook action.
I wanted to create a workflow to pass EC2 instances created with this playbook to new actions.
However, after ansible execution ends, it is not linked to the next task.

How can I solve it?

[Playbook]

- name: "create ec2 instance"
  ec2:
    instance_tags:
      Name: "{{ ec2.name }}"
    key_name: "{{ keypair.name }}"
    instance_type: "{{ ec2.instance_type }}"
    image: "{{ ec2.image }}"
    wait: yes
    group: "{{ secgrp.name }}"
    count: 1
    vpc_subnet_id: "{{ vpc_regst.subnet.id }}"
    assign_public_ip: yes
  register: ec2_regst

[workflow]

    tasks:
      task1:
        action: ansible.playbook
        input:
          playbook: <% $.param %>
        publish:
          instance_id: ec2_regst.instances[0].id
          ec2rr: ec2_regst
        on-success:
          - task2
      task2:
        action: core.local
        input:
          cmd: "echo '$ <% $ %> $.param: <% $.param %>, $.instance_id: <% $.instance_id %>, $.ec2err: <% $.ec2err %>'"

The only way to link with Ansible is to pass parameters in RabbitMQ or a file.

Data output from Ansible run should be json-formatted for StackStorm to be able to access/query that in a workflow as structured foo.bar.

Try playing with GitHub - StackStorm-Exchange/stackstorm-ansible: st2 content pack containing ansible integrations to make sure Ansible play result output is json.