summaryrefslogtreecommitdiff
path: root/windows/win_uri.py
diff options
context:
space:
mode:
authorCorwin Brown <blakfeld@d-cbrown.corp.maxpointinteractive.com>2015-10-27 15:02:02 -0500
committerCorwin Brown <blakfeld@d-cbrown.corp.maxpointinteractive.com>2015-10-27 15:08:03 -0500
commit7c12ed8af0d78349e76e098cef5e3d77df2ef0b6 (patch)
tree55c5033c164b8f5c15a0a370181de3fe67b141bb /windows/win_uri.py
parentc35c37258f0b46ef8cbecd8c38ffc733160fa019 (diff)
downloadansible-modules-extras-7c12ed8af0d78349e76e098cef5e3d77df2ef0b6.tar.gz
Using Get-AnsibleParam
conflict typo
Diffstat (limited to 'windows/win_uri.py')
-rw-r--r--windows/win_uri.py27
1 files changed, 24 insertions, 3 deletions
diff --git a/windows/win_uri.py b/windows/win_uri.py
index 451c9658..16153363 100644
--- a/windows/win_uri.py
+++ b/windows/win_uri.py
@@ -24,7 +24,7 @@
DOCUMENTATION = """
---
module: win_uri
-version_added: ""
+version_added: "2.0"
short_description: Interacts with webservices.
description:
- Interacts with HTTP and HTTPS services.
@@ -32,10 +32,12 @@ options:
url:
description:
- HTTP or HTTPS URL in the form of (http|https)://host.domain:port/path
+ required: true
method:
description:
- The HTTP Method of the request or response.
default: GET
+ required: false
choices:
- GET
- POST
@@ -53,13 +55,17 @@ options:
body:
description:
- The body of the HTTP request/response to the web service.
+ required: false
+ default: None
headers:
description:
- Key Value pairs for headers. Example "Host: www.somesite.com"
-author: Corwin Brown
+ required: false
+ default: None
+author: Corwin Brown (@blakfeld)
"""
-Examples= """
+Examples = """
# Send a GET request and store the output:
---
- name: Perform a GET and Store Output
@@ -90,4 +96,19 @@ Examples= """
url: http://www.somesite.com
method: POST
body: "{ 'some': 'json' }"
+
+# Check if a file is available on a webserver
+---
+- name: Ensure Build is Available on Fileserver
+ when: ensure_build
+ win_uri:
+ url: "http://www.somesite.com"
+ method: HEAD
+ headers:
+ test: one
+ another: two
+ register: build_check_output
+ until: build_check_output.StatusCode == 200
+ retries: 30
+ delay: 10
"""