# Variabilisation of url with url\_get to download a file on artifactory

**URL:** <https://forum.ansible.com/t/variabilisation-of-url-with-url-get-to-download-a-file-on-artifactory/36180>\
**Category:** Ansible Project\
**Created:** [January 6, 2022, 9:51am UTC](https://forum.ansible.com/t/variabilisation-of-url-with-url-get-to-download-a-file-on-artifactory/36180 "2022-01-06T09:51:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![guillaume\_payen](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@guillaume\_payen](https://forum.ansible.com/u/guillaume_payen)\
**Post date:** [January 6, 2022, 9:51am UTC](https://forum.ansible.com/t/variabilisation-of-url-with-url-get-to-download-a-file-on-artifactory/36180/1 "2022-01-06T09:51:55Z")

</div>

Hello ! I am new on Ansible and wanted to know if there was an easy way to download the last or specified version of a file from an artifactory repo.

Here is what i am trying to do :  
vars:  
artifactory\_base\_url: [https://artifactorybaseUrl/](https://artifactorybaseUrl/)

- name: Download artifact  
get\_url:  
url: {{ item }}  
dest: /someDir/  
with\_items:

- {{ artifactory\_base\_url }}/someArtifactDir/{{ versionA1 }}/\*.tar.gz

- {{ artifactory\_base\_url }}/someArtifactDir2/{{ versionA2 }}/\*.tar.gz

versionA1 and versionA2 are extra\_vars given by some jenkins, the idea beeing to download the tar.gz file in each directory since the files names are not the best and i’d like to be able to only give the wanted version as initial information.

Is there a way to do this ? Or am i totally missing something and there an other module to do this better ?
