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,170 points
434 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,160 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 29, 2020 in Ansible by MD
• 95,160 points
583 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,160 points
490 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,063 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,160 points
254 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,160 points
82 views