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.
---
- hosts: dbserver
vars_prompt:
- name: "gitlabuser"
prompt: "Enter your Github Username"
private: no
- name: "gitlabpassword"
prompt: "Enter your Gitlab Password"
private: yes
tasks:
- get_url:
url: "{{ item }}"
dest: /home/ubuntu
register: download
until: download is succeeded
delay: 3
loop:
- https://github.com/kamitv/devops/blob/master/FileA.txt
- https://github.com/kamitv/devops/blob/master/FileB.txt
Here is the output when I open these files, I just need the contents of
these files to be in these text file, anyway we can get this ?
<!DOCTYPE html>
<html lang="en" data-color-mode="auto" data-light-theme="light"
data-dark-theme="dark" data-a11y-animated-images="system">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com">
<link rel="dns-prefetch" href="https://avatars.githubusercontent.com">
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/
">
<link rel="preconnect" href="https://github.githubassets.com" crossorigin>
<link rel="preconnect" href="https://avatars.githubusercontent.com">
<link crossorigin="anonymous" media="all" rel="stylesheet" href="
https://github.githubassets.com/assets/light-0946cdc16f15.css" /><link
crossorigin="anonymous" media="all" rel="stylesheet" href="
https://github.githubassets.com/assets/dark-3946c959759a.css" /><link
data-color-theme="dark_dimmed" crossorigin="anonymous" media="all"
rel="stylesheet" data-href="
https://github.githubassets.com/assets/dark_dimmed-9b9a8c91acc5.css"
/><link data-color-theme="dark_high_contrast" crossorigin="anonymous"
media="all" rel="stylesheet" data-href="
https://github.githubassets.com/assets/dark_high_contrast-11302a585e33.css"
/><link data-color-theme="dark_colorblind" crossorigin="anonymous"
media="all" rel="stylesheet" data-href="
https://github.githubassets.com/assets/dark_colorblind-1a4564ab0fbf.css"
/><link data-color-theme="light_colorblind" crossorigin="anonymous"
media="all" rel="stylesheet" data-href="
https://github.githubassets.com/assets/light_colorblind-12a8b2aa9101.css"
/><link data-color-theme="light_high_contrast" crossorigin="anonymous"
media="all" rel="stylesheet" data-href="
https://github.githubassets.com/assets/light_high_contrast-5924a648f3e7.css"
/><link data-color-theme="light_tritanopia" crossorigin="anonymous"
media="all" rel="stylesheet" data-href="
https://github.githubassets.com/assets/light_tritanopia-05358496cb79.css"
/><link data-color-theme="dark_tritanopia" crossorigin="anonymous"
media="all" rel="stylesheet" data-href="
https://github.githubassets.com/assets/dark_tritanopia-aad6b801a158.css" />
On Thu, May 25, 2023 at 2:00 AM Dick Visser <[email protected]> wrote:
> https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html
>
>
> On Thu, 25 May 2023 at 03:08, Amit Kulkarni <[email protected]> wrote:
>
>> 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
>>
>>
>> ---
>> - hosts: dbserver
>> gather_facts: no
>> tasks:
>> - name: Download File from Gitlab
>> become: yes
>> get_url:
>> url: https://github.com/kamitv/devops/blob/master/FileA.txt
>> url_username: kamitv
>> url_password: XXXXXXX
>> dest: /home/ubuntu/
>>
>> Regards
>> Amit
>>
>>
>> --
>> 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 [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAON3ZR3aUTBpj%3Dba_NWwc%2BAMdSzujFiLCFJZ%2BV%2BiYi731E%3DvUQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CAON3ZR3aUTBpj%3Dba_NWwc%2BAMdSzujFiLCFJZ%2BV%2BiYi731E%3DvUQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> Sent from Gmail Mobile
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAF8BbLY31NSQWW4CCCzYK85prCKdbzVpVU_axgdwHLamwX0jvQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAF8BbLY31NSQWW4CCCzYK85prCKdbzVpVU_axgdwHLamwX0jvQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAON3ZR2zjNjjy-Z4_yphi1Ebg-tEDx%2B94_iGv%2Bd0nWcxeCcFHA%40mail.gmail.com.