# unarchive.Get a name of file what is inside of src file

**URL:** <https://forum.ansible.com/t/unarchive-get-a-name-of-file-what-is-inside-of-src-file/23590>\
**Category:** Ansible Project\
**Created:** [January 30, 2017, 10:10am UTC](https://forum.ansible.com/t/unarchive-get-a-name-of-file-what-is-inside-of-src-file/23590 "2017-01-30T10:10:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhh](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@mhh](https://forum.ansible.com/u/mhh)\
**Post date:** [January 30, 2017, 10:10am UTC](https://forum.ansible.com/t/unarchive-get-a-name-of-file-what-is-inside-of-src-file/23590/1 "2017-01-30T10:10:31Z")

</div>

Hello,  
I found, that is nearly impossible to make a symlink from compressed file, without knowing of what is in this file.  
For example i want to do:

-name Untar  
unarchive: src={{ my\_tar\_gz\_file }} dest={{ dest }}

-name Make a symlink  
file: src=‘{{ dest }}/ ???i\_dont\_know\_whats\_is\_inside\_tar\_file?? ’ dest=’{{ dest }}/my\_sim\_link’ state=link

In this compress file can be a file, or folder. Lets assumption, that evertime is folder there. But everytime has a another name, for example build number.  
Is this posible to solve it without command: and shell: module? in idepotend style? Of course that unarchive has a parm creates, but it does not work in this case  
Thanks

---

<div class="post-metadata">

**Author:** ![mhh](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@mhh](https://forum.ansible.com/u/mhh)\
**Post date:** [January 30, 2017, 11:08am UTC](https://forum.ansible.com/t/unarchive-get-a-name-of-file-what-is-inside-of-src-file/23590/2 "2017-01-30T11:08:08Z")

</div>

Seems that list\_files=true and {{ unarchived.files[0] }} alway returns folder in this case

Dne pondělí 30. ledna 2017 11:10:31 UTC+1 mhh napsal(a):
