# Need to download Multiple files from Gitlab using Ansible

**URL:** <https://forum.ansible.com/t/need-to-download-multiple-files-from-gitlab-using-ansible/38029>\
**Category:** Ansible Project\
**Created:** [May 25, 2023, 1:07am UTC](https://forum.ansible.com/t/need-to-download-multiple-files-from-gitlab-using-ansible/38029 "2023-05-25T01:07:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amit\_Kulkarni](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@Amit\_Kulkarni](https://forum.ansible.com/u/Amit_Kulkarni)\
**Post date:** [May 25, 2023, 1:07am UTC](https://forum.ansible.com/t/need-to-download-multiple-files-from-gitlab-using-ansible/38029/1 "2023-05-25T01:07:38Z")

</div>

Hello All,

I need to download multiple files from Gitlab, i am able to download one file using below playbook but I need help to download multiple files from Gitlab. Here is the sample playbook I wanted to read the file names into ansible playbook and download from Gitlab.

Appreciate your help on this

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [May 25, 2023, 6:00am UTC](https://forum.ansible.com/t/need-to-download-multiple-files-from-gitlab-using-ansible/38029/2 "2023-05-25T06:00:09Z")

</div>

[https://docs.ansible.com/ansible/latest/playbook\_guide/playbooks\_loops.html](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html)

---

<div class="post-metadata">

**Author:** ![Amit\_Kulkarni](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@Amit\_Kulkarni](https://forum.ansible.com/u/Amit_Kulkarni)\
**Post date:** [May 25, 2023, 1:25pm UTC](https://forum.ansible.com/t/need-to-download-multiple-files-from-gitlab-using-ansible/38029/3 "2023-05-25T13:25:41Z")

</div>

Hello Dick,

Thanks for the response, I am able to download the files however its downloading everything (showing all html codes, design code for github webpage etc).

Is there any way to get the contents of the actual file and not the entire page contents.

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [May 25, 2023, 3:07pm UTC](https://forum.ansible.com/t/need-to-download-multiple-files-from-gitlab-using-ansible/38029/4 "2023-05-25T15:07:10Z")

</div>

You are getting what you asked for, because these URLs are the web  
pages that describe the file.  
If you want the actual files, then you'd need to use the Github raw file URL.  
The web page has a special button for that.  
In your case the URL would look like:

[https://raw.githubusercontent.com/kamitv/devops/master/FileB.txt](https://raw.githubusercontent.com/kamitv/devops/master/FileB.txt)

etc
