I don’t know what I’m doing wrong, I’m desperate.
any help?

On Thu, Jan 5, 2023 at 12:13 PM SysAdmin EM <[email protected]> wrote:

> ok: [localhost] => {
>    "msg": "var=snapshotid\""
> }
>
> i think the "register" not work
>
> On Thu, Jan 5, 2023 at 12:08 PM 'Rowe, Walter P. (Fed)' via Ansible
> Project <[email protected]> wrote:
>
>> 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
>> <https://groups.google.com/d/msgid/ansible-project/5A86F82A-43E2-4740-AFE7-E51C23031090%40nist.gov?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/CAGUDtnkoWZ_Q9ox08jei%3DerzpUhEXkVG34S6SgiqiqaKJPM7wA%40mail.gmail.com.

Reply via email to