First attempt at standardizing DOCUMENTATION string (new DICT)

This commit is contained in:
Jan-Piet Mens
2012-09-17 15:11:04 +02:00
parent 7df0e5259f
commit e041c2e2cd
3 changed files with 84 additions and 0 deletions

View File

@@ -24,6 +24,47 @@ import shutil
import datetime
import tempfile
DOCUMENTATION = '''
---
module: get_url
short_description: Downloads files from HTTP, HTTPS, or FTP to node
description: >
Downloads files from HTTP, HTTPS, or FTP to the remote server. The remote
server must have direct access to the remote resource.
version_added: "0.6"
options:
- url:
description: HTTP, HTTPS, or FTP URL
required: true
default: null
aliases: []
- dest:
description: absolute path of where to download the file to. If dest is a
directory, the basename of the file on the remote server will be used. If
a directory, thirsty=yes must also be set.
required: true
default: null
- thirsty:
description: if yes, will download the file every time and replace the
file if the contents change. if no, the file will only be downloaded if
the destination does not exist. Generally should be 'yes' only for small
local files. prior to 0.6, acts if 'yes' by default.
version_added: "0.7"
required: false
choices: [ "yes", "no" ]
default: "no"
- others:
description: all arguments accepted by the file module also work here
required: false
examples:
- code: get_url url=http://example.com/path/file.conf dest=/etc/foo.conf mode=0440
description: Obtain and install config file
notes: >
This module doesn't support proxies or passwords.
# informational: requirements for nodes
requirements: [ urllib2, urlparse ]
'''
HAS_URLLIB2=True
try:
import urllib2