Change this:

   - name: "mostrando"
     debug: var=show_id_snapshot.snapshot_id

to

   - name: "mostrando"
     debug: var=show_id_snapshot

so we can see the entirety of what is registered.

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

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

Ok, the output shows me what I have been showing in previous answers.

Here my playbook

---
- name: "Volumenes sin usar"
 hosts: localhost
 gather_facts: yes
 vars:
   aws_volume_id:
     - vol-xxxxxxxxxxxxx
 tasks:
   - name: "Creando snapshot desde el volumen"
     amazon.aws.ec2_snapshot:
       volume_id: "{{ item }}"
       wait_timeout: 900
       snapshot_tags:
         MarkedForDeletion: true
     register: show_id_snapshot
     with_items: "{{ aws_volume_id }}"

   - name: "mostrando"
     debug: var=show_id_snapshot.snapshot_id

Here the debug 
https://pastebin.pl/view/20bf3d1e<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpastebin.pl%2Fview%2F20bf3d1e&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cc9a46760932c4c1b10b708daef350a92%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638085308339492447%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=aTOw2zJdT8WJ7oxbLOakIAS6KWKlTZ12BJ9Xd9tWIsM%3D&reserved=0>

will I be using some reserved word? I don’t understand where the problem is the 
key exists in the command output.

On Thu, Jan 5, 2023 at 12:43 PM 'Rowe, Walter P. (Fed)' via Ansible Project 
<[email protected]<mailto:[email protected]>> 
wrote:
   - name: "mostrando"
     debug:
       msg: var=show_id_snapshot

should be

   - name: "mostrando"
     debug: var=show_id_snapshot

or

   - name: "mostrando"
     debug:
       var: show_id_snapshot

or

   - name: "mostrando"
     debug:
       msg: "{{ show_id_snapshot }}"

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

On Jan 5, 2023, at 10:41 AM, SysAdmin EM 
<[email protected]<mailto:[email protected]>> wrote:

i Try this tasks:

---
- name: "Volumenes sin usar"
 hosts: localhost
 gather_facts: yes
 vars:
   aws_volume_id:
     - vol-xxxxxxxxxxxxxxxx
 tasks:
   - name: "Creando snapshot desde el volumen"
     amazon.aws.ec2_snapshot:
       volume_id: "{{ item }}"
       wait_timeout: 900
       snapshot_tags:
         MarkedForDeletion: true
     register: show_id_snapshot
     with_items: "{{ aws_volume_id }}"

   - name: "mostrando"
     debug:
       msg: var=show_id_snapshot

All debug is here: 
https://pastebin.pl/view/eb4b1e29<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpastebin.pl%2Fview%2Feb4b1e29&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cc9a46760932c4c1b10b708daef350a92%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638085308339492447%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Ja00uYNOOX7AIMi5PtpR6lH5Mz7cxJibgrinh2ikp1g%3D&reserved=0>

Thanks for the help.


On Thu, Jan 5, 2023 at 12:38 PM Todd Lewis 
<[email protected]<mailto:[email protected]>> wrote:
The register worked fine, but there's a typo in your debug task, which you have 
not shown us.

On 1/5/23 10:30 AM, SysAdmin EM wrote:
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]<mailto:[email protected]>> wrote:
ok: [localhost] => {
   "msg": "var=snapshotid\""
}

i think the "register" not work


--
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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/66aa2a97-3063-8dad-c705-662d1882c210%40gmail.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2F66aa2a97-3063-8dad-c705-662d1882c210%2540gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cc9a46760932c4c1b10b708daef350a92%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638085308339492447%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cNg0GguExe48jtY1MiZiGbJIxA4TQy1V3qOqrjBVKYs%3D&reserved=0>.

--
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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAGUDtnk0GAaR0LzSaDp-_25LcLFguh5ehowoVroDdGkkt0EZeA%40mail.gmail.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2FCAGUDtnk0GAaR0LzSaDp-_25LcLFguh5ehowoVroDdGkkt0EZeA%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cc9a46760932c4c1b10b708daef350a92%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638085308339492447%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nVA18UaxCg1STmSLXVMcps0nTT71dJKD2Qo4W3qIdVg%3D&reserved=0>.


--
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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/F0108281-263B-47B1-80E2-AC404778644C%40nist.gov<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2FF0108281-263B-47B1-80E2-AC404778644C%2540nist.gov%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cc9a46760932c4c1b10b708daef350a92%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638085308339492447%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=stvSKyf9hy9z7c6q30cYbYeRel%2BnjeM01wNm4KnmeMc%3D&reserved=0>.

--
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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAGUDtn%3DHiKkN00Dk_uddy6X_1wjnz0jdeDt%3DO_KyhidJ-W%3Dp_w%40mail.gmail.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2FCAGUDtn%253DHiKkN00Dk_uddy6X_1wjnz0jdeDt%253DO_KyhidJ-W%253Dp_w%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cc9a46760932c4c1b10b708daef350a92%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638085308339492447%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7oBlxt2emYsJpfDfP%2Bw1udlY84cghCc1xDKbI4wF9uE%3D&reserved=0>.

-- 
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/4703F454-2806-4D56-9C24-2BCBD5882B3A%40nist.gov.

Reply via email to