How to copy folders using url in windows in ansible

0 votes

Hi Guys,

I have configured the Ansible controller node. I want to copy folders using URL in windows from the Ansible controller node. How can I do that?

Aug 27, 2020 in Ansible by akhtar
• 38,260 points
2,101 views

1 answer to this question.

0 votes

Hi@akhtar,

You can find the win_get_url module. This module is used to download files from a URL in the Windows system. You can see the below example.

- name: Download earthrise.jpg to specified path
  win_get_url:
    url: URL
    dest: C:\Users\RandomUser\earthrise.jpg
answered Aug 27, 2020 by MD
• 95,460 points
The question is how to download folder, or fileS, not single file

Hi,

You can use the copy module as well, as shown below.

- name: Ansible copy directory to the remote server
    copy:
      src:/Users/mdtutorials2/Documents/Ansible/copy_dir_ex
      dest:/Users/mdtutorials2/Documents/Ansible/tmp

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

How to install httpd web server in remote node using Ansible?

Hi@akhtar, You need to use the package module in Ansible. ...READ MORE

answered Jul 30, 2020 in Ansible by MD
• 95,460 points
2,571 views
0 votes
1 answer

How to start httpd service in a remote system using Ansible?

Hi@akhtar, Ansible has a module named service. This ...READ MORE

answered Jul 30, 2020 in Ansible by MD
• 95,460 points
3,324 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,987 views
+2 votes
1 answer
0 votes
1 answer

How to copy files in remote system using Ansible?

Hi@akhtar, You need to use the copy module ...READ MORE

answered Jul 30, 2020 in Ansible by MD
• 95,460 points
2,349 views
0 votes
1 answer

How to copy an AMI in a different region using Ansible Playbook?

Hi@akhtar, Ansible has one module to copy AMI ...READ MORE

answered Dec 4, 2020 in Ansible by MD
• 95,460 points
970 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP