Please change this:

    - name: "Debug"
      debug:
        msg: "{{ item.snapshot_id }}"
      with_items: "{{ snapshotid }}"


to this:

    - name: "Debug"
      debug: var=snapshotid

So you can see the entire registered result returned from the prior task.

Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123

On Jan 5, 2023, at 9:24 AM, SysAdmin EM <[email protected]> wrote:

Here my playbook:

---
- name: "test"
  hosts: localhost
  gather_facts: no
  vars:
    aws_volume_id:
      - vol-xxxxxxxxxxxxxxxxx
      - vol-xxxxxxxxxxxxxxxxx
  tasks:
    - name: "test"
      amazon.aws.ec2_snapshot:
        volume_id: "{{ item }}"
        wait_timeout: 900
        snapshot_tags:
            MarkedForDeletion: true
      register: snapshotid
      with_items: "{{ aws_volume_id }}"

    - name: "Debug"
      debug:
        msg: "{{ item.snapshot_id }}"
      with_items: "{{ snapshotid }}"

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5A86F82A-43E2-4740-AFE7-E51C23031090%40nist.gov.

Reply via email to