Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
df63f60b
Commit
df63f60b
authored
Feb 16, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak doc examples
parent
1232e498
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
library/uri
+10
-12
No files found.
library/uri
View file @
df63f60b
...
@@ -33,8 +33,8 @@ DOCUMENTATION = '''
...
@@ -33,8 +33,8 @@ DOCUMENTATION = '''
module: uri
module: uri
short_description: Interacts with webservices
short_description: Interacts with webservices
description:
description:
- Interacts with HTTP and HTTPS webservices and supports Digest, Basic and WSSE
- Interacts with HTTP and HTTPS web
services and supports Digest, Basic and WSSE
HTTP authentication mechanisms.
HTTP authentication mechanisms.
version_added: "1.1"
version_added: "1.1"
options:
options:
url:
url:
...
@@ -45,7 +45,7 @@ options:
...
@@ -45,7 +45,7 @@ options:
aliases: []
aliases: []
dest:
dest:
description:
description:
- path of where to download the file to.
- path of where to download the file to
(if desired)
.
- If I(dest) is a directory, the basename of the file on the remote server will be used.
- If I(dest) is a directory, the basename of the file on the remote server will be used.
required: false
required: false
default: null
default: null
...
@@ -72,7 +72,7 @@ options:
...
@@ -72,7 +72,7 @@ options:
default: "GET"
default: "GET"
return_content:
return_content:
description:
description:
- Whether or not to return the body of the request
in the "content" register variable
.
- Whether or not to return the body of the request
as a "content" key in the dictionary result
.
required: false
required: false
choices: [ "yes", "no" ]
choices: [ "yes", "no" ]
default: no
default: no
...
@@ -120,27 +120,25 @@ examples:
...
@@ -120,27 +120,25 @@ examples:
description: "Check that you can connect to a page and it returns a status 200"
description: "Check that you can connect to a page and it returns a status 200"
- code: |
- code: |
uri:
url=http://www.awesome.com method=GET return_content=yes
action: uri
url=http://www.awesome.com method=GET return_content=yes
register: webpage
register: webpage
command: /usr/bin/uptime
action: fail
when_string: '"AWESOME" in "${webpage.content}"'
when_string: '"AWESOME"
not
in "${webpage.content}"'
description: Check that a page returns a status 200 and the word AWESOME is in the page contents.
description: Check that a page returns a status 200 and the word AWESOME is in the page contents.
- code: |
- code: |
uri:
url=https://your.jira.server.com/rest/api/2/issue/ method=POST user=your_username password=your_pass body='$FILE(issue.json)' force_basic_auth=yes status_code=201 HEADER_Content-Type="application/json"
action: uri
url=https://your.jira.server.com/rest/api/2/issue/ method=POST user=your_username password=your_pass body='$FILE(issue.json)' force_basic_auth=yes status_code=201 HEADER_Content-Type="application/json"
description: "Create a JIRA issue."
description: "Create a JIRA issue."
- code: |
- code: |
uri:
url=https://your.form.based.auth.app.com/index.php method=POST body="name=your_username&password=your_password&enter=Sign
%20
in" status_code=302 HEADER_Content-Type="application/x-www-form-urlencoded"
action: uri
url=https://your.form.based.auth.app.com/index.php method=POST body="name=your_username&password=your_password&enter=Sign
%20
in" status_code=302 HEADER_Content-Type="application/x-www-form-urlencoded"
register: login
register: login
uri:
url=https://your.form.based.auth.app.com/dashboard.php method=GET return_content=yes HEADER_Cookie="${login.set_cookie}"
action: uri
url=https://your.form.based.auth.app.com/dashboard.php method=GET return_content=yes HEADER_Cookie="${login.set_cookie}"
description: "Login to a form based webpage, then use the cookie that got returned to access the app in later tasks."
description: "Login to a form based webpage, then use the cookie that got returned to access the app in later tasks."
notes:
- This module doesn't yet support configuration for proxies.
# informational: requirements for nodes
# informational: requirements for nodes
requirements: [ urlparse, httplib2 ]
requirements: [ urlparse, httplib2 ]
author: Romeo Theriault
author: Romeo Theriault
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment