# Playbook to parse yaml file and get the output

**URL:** <https://forum.ansible.com/t/playbook-to-parse-yaml-file-and-get-the-output/30757>\
**Category:** Ansible Project\
**Created:** [July 11, 2019, 1:53pm UTC](https://forum.ansible.com/t/playbook-to-parse-yaml-file-and-get-the-output/30757 "2019-07-11T13:53:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rakesh\_Parida](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@Rakesh\_Parida](https://forum.ansible.com/u/Rakesh_Parida)\
**Post date:** [July 11, 2019, 1:53pm UTC](https://forum.ansible.com/t/playbook-to-parse-yaml-file-and-get-the-output/30757/1 "2019-07-11T13:53:33Z")

</div>

Hi,

I have yaml as follows:

deliveries:

- releases:
- latest\_Rel:
- aaa:  
file\_name: some.tar  
md5: xxxxxxxxxxxxxxx  
product\_name: aaa  
product\_number: aaa 902 8057  
release\_candidate: Rel  
version: 25.1.1
- bbb:  
file\_name: some1.tar  
md5: xxxxxxxxxxxxx  
product\_name: bbb  
product\_number: bbb 903 6746  
release\_candidate: Rel  
version: 25.0.0
- abc:  
file\_name: some2.gz  
md5: xxxxxxx  
product\_name: abc  
product\_number: None  
release\_candidate: None  
version: ABC
- abd:  
file\_name: some3.tar  
md5: xxxxxx  
product\_name: abd  
product\_number: abd 902 7815  
release\_candidate: Rel  
version: 25.1.1
- abe:  
file\_name: some4.gz  
md5: xxxxxxxxxxxxxxxxx  
product\_name: abe  
product\_number: abe 123 456  
release\_candidate: Rel  
version: 25.1.1

I want to write a playbook to extract "file name: " tar files which is having version 25.1.1.  
Pls help

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [July 11, 2019, 2:05pm UTC](https://forum.ansible.com/t/playbook-to-parse-yaml-file-and-get-the-output/30757/2 "2019-07-11T14:05:20Z")

</div>

Start here: [https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_intro.html](https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html)

---

<div class="post-metadata">

**Author:** ![Rakesh\_Parida](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@Rakesh\_Parida](https://forum.ansible.com/u/Rakesh_Parida)\
**Post date:** [July 12, 2019, 7:03am UTC](https://forum.ansible.com/t/playbook-to-parse-yaml-file-and-get-the-output/30757/3 "2019-07-12T07:03:27Z")

</div>

Hi  
Can anybody suggest

My playbook:
