1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Improve YAML examples - windows/win_get_url.py (#19404)

This commit is contained in:
Fabio Alessandro Locati 2016-12-15 23:59:07 +01:00 committed by Matt Davis
parent 5f8f1fa782
commit 5a87f26658

View file

@ -92,23 +92,18 @@ options:
''' '''
EXAMPLES = r''' EXAMPLES = r'''
# Downloading a JPEG and saving it to a file with the ansible command. - name: Download earthrise.jpg to specified path
# 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: win_get_url:
url: http://www.example.com/earthrise.jpg url: http://www.example.com/earthrise.jpg
dest: C:\Users\RandomUser\earthrise.jpg dest: C:\Users\RandomUser\earthrise.jpg
- name: Download earthrise.jpg to 'C:\Users\RandomUser\earthrise.jpg' only if modified - name: Download earthrise.jpg to specified path only if modified
win_get_url: win_get_url:
url: http://www.example.com/earthrise.jpg url: http://www.example.com/earthrise.jpg
dest: C:\Users\RandomUser\earthrise.jpg dest: C:\Users\RandomUser\earthrise.jpg
force: no force: no
- name: Download earthrise.jpg to 'C:\Users\RandomUser\earthrise.jpg' through a proxy server. - name: Download earthrise.jpg to specified path through a proxy server.
win_get_url: win_get_url:
url: http://www.example.com/earthrise.jpg url: http://www.example.com/earthrise.jpg
dest: C:\Users\RandomUser\earthrise.jpg dest: C:\Users\RandomUser\earthrise.jpg
@ -116,7 +111,8 @@ $ ansible -i hosts -c winrm -m win_get_url -a "url=http://www.example.com/earthr
proxy_username: username proxy_username: username
proxy_password: password proxy_password: password
''' '''
RETURN = '''
RETURN = r'''
url: url:
description: requested url description: requested url
returned: always returned: always
@ -126,5 +122,5 @@ dest:
description: destination file/path description: destination file/path
returned: always returned: always
type: string type: string
sample: 'C:\\Users\\RandomUser\\earthrise.jpg' sample: C:\Users\RandomUser\earthrise.jpg
''' '''