From b22e2160cf602f261ef9cd00f5a35da351df1456 Mon Sep 17 00:00:00 2001 From: Paul Durivage Date: Wed, 18 Jun 2014 15:04:51 -0500 Subject: [PATCH] Add win_get_url module documentation --- library/windows/win_get_url | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 library/windows/win_get_url diff --git a/library/windows/win_get_url b/library/windows/win_get_url new file mode 100644 index 0000000000..540b6b61b6 --- /dev/null +++ b/library/windows/win_get_url @@ -0,0 +1,34 @@ +DOCUMENTATION = ''' +--- +module: win_get_url +version_added: "1.7" +short_description: Fetches a file from a given URL +description: + - Fetches a file from a URL and saves to locally +options: + url: + description: + - The full URL of a file to download + required: true + default: null + aliases: [] + dest: + description: + - The absolute path of the location to save the file at the URL. Be sure to include a filename and extension as appropriate. + required: false + default: yes + aliases: [] +author: Paul Durivage +''' + +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' +''' \ No newline at end of file