win_get_url - Fetches a file from a given URL

Author:Paul Durivage

Synopsis

New in version 1.7.

Fetches a file from a URL and saves to locally

Options

parameter required default choices comments
dest no True
    The absolute path of the location to save the file at the URL. Be sure to include a filename and extension as appropriate.
    url yes
      The full URL of a file to download

      Examples


      # Downloading a JPEG and saving it to a file with the ansible command.
      # Note the "dest" is quoted rather instead of escaping the backslashes
      $ ansible -i hosts -c winrm -m win_get_url -a "url=http://www.example.com/earthrise.jpg dest='C:\Users\Administrator\earthrise.jpg'" all
      
      # Playbook example
      - name: Download earthrise.jpg to 'C:\Users\RandomUser\earthrise.jpg'
        win_get_url:
          url: 'http://www.example.com/earthrise.jpg'
          dest: 'C:\Users\RandomUser\earthrise.jpg'
      

      Table Of Contents

      Previous topic

      win_feature - Installs and uninstalls Windows Features

      Next topic

      win_group - Add and remove local groups