Little syntax correction -

---
 - name: "Download the patches for sage"
   hosts: app
   vars:
     my_dest: /busdata/qwm/mna1/geodev12/folders/GX/PATCH/
     my_url: "
https://raw.gitlabusercontent.michelin.com/na-sc/na-log/wms_nca/wms_na_patch/sagepatch/
"
   tasks:
     - get_url:
        url: "{{ my_url }}/{{ item }}"
        dest: "{{ my_dest }}/{{ item }}"
      register: download
      until: download is succeeded
      delay: 3
      loop:
         - SRC_WMS_V12_04_0017.dat
         - SRC_WMS_V12_04_0018_txt.dat
         - SRC_WMS_V12_04_0019.dat
         - SRC_WMS_V12_04_0020.dat

On Fri, Jun 9, 2023 at 1:20 PM Amit Kulkarni <amit1811...@gmail.com> wrote:

> Hello Abhijit,
>
> Thanks for your help, I came up with another one, if you could provide
> your input that would be great.
> Please let me know is this looking ok, what I am trying to do is t
>
> ---
>  - name: "Download the patches for sage"
>    hosts: app
>    vars:
>      my_dest: /busdata/qwm/mna1/geodev12/folders/GX/PATCH/
>      my_url: "
> https://raw.gitlabusercontent.michelin.com/na-sc/na-log/wms_nca/wms_na_patch/sagepatch/
> "
>    tasks:
>      - get_url:
>         url: "{{ my_url }}/{{ my_file }}"
>         dest: "{{ my_dest }}/{{ my_file }}"
>         register: download
>         until: download is succeeded
>         delay: 3
>         my_file: "{{ item }}"
>         loop:
>          - SRC_WMS_V12_04_0017.dat
>          - SRC_WMS_V12_04_0018_txt.dat
>          - SRC_WMS_V12_04_0019.dat
>          - SRC_WMS_V12_04_0020.dat
>
>
>
> On Fri, Jun 9, 2023 at 3:38 PM Abhijeet Kasurde <akasu...@redhat.com>
> wrote:
>
>> Use
>>
>> dest: "/busdata/qwm/mna1/geodev12/folders/GX/PATCH/{{ item | basename }}"
>>
>> On Fri, Jun 9, 2023 at 12:23 PM Amit Kulkarni <amit1811...@gmail.com>
>> wrote:
>>
>>> Hello All,
>>>
>>> I have the below playbook, I wanted to download the files from gitlab on
>>> same path with different names. I have below playbook,
>>> As can seen below source path is same but file name is different, I need
>>> to have src path defined and should mention only file names in loop or may
>>> be i can read these names from different file itself.
>>>
>>> Appreciate any help with this
>>> ---
>>>   - name: Download the files from GITLAB for Patching
>>>     hosts: app
>>>     tasks:
>>>       - get_url:
>>>           url: "{{ item }}"
>>>           dest: /busdata/qwm/mna1/geodev12/folders/GX/PATCH/
>>>           url_username:
>>>           url_password:
>>>         register: download
>>>         until: download is succeeded
>>>         delay: 3
>>>         loop:
>>>           -
>>> https://raw.gitlabusercontent.michelin.com/na-sc/na-log/wms_nca/wms_na_patch/sagepatch/SRC_WMS_V12_04_0017.dat
>>>           -
>>> https://raw.gitlabusercontent.michelin.com/na-sc/na-log/wms_nca/wms_na_patch/sagepatch/SRC_WMS_V12_04_0018_txt.dat
>>>           -
>>> https://raw.gitlabusercontent.michelin.com/na-sc/na-log/wms_nca/wms_na_patch/sagepatch/SRC_WMS_V12_04_0019.dat
>>>           -
>>> https://raw.gitlabusercontent.michelin.com/na-sc/na-log/wms_nca/wms_na_patch/sagepatch/SRC_WMS_V12_04_0020.dat
>>>
>>> --
>>> 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 ansible-project+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/CAON3ZR2d9hJ7PHdRW1ToRHQhXL9gm-Qa08aw0jb11vj2vWQH2A%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/ansible-project/CAON3ZR2d9hJ7PHdRW1ToRHQhXL9gm-Qa08aw0jb11vj2vWQH2A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>> Thanks,
>> Abhijeet Kasurde
>>
>> --
>> 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 ansible-project+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAFwWkHoj%3DVvJgTNzMkZaObw3GuZku1kdGEs-s2Lsi3aR3hauwg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CAFwWkHoj%3DVvJgTNzMkZaObw3GuZku1kdGEs-s2Lsi3aR3hauwg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
Thanks,
Abhijeet Kasurde

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFwWkHojZogtk8kE2gpRq3Tfa4KmDCbXygkDcnxtj7%2BisE11CQ%40mail.gmail.com.

Reply via email to