summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwhiter <rob.white@truelocal.com.au>2015-05-28 15:27:46 +1000
committerToshio Kuratomi <toshio@fedoraproject.org>2015-05-29 08:50:04 -0700
commit9fd634396b22fb0967a15cb056d3ec153a58029c (patch)
treefccebe39a23591cd79964d2cf7ccf5d40a9c109d
parent92dc4f797302b6f7ba25fd5f214b9fa9efa3f65f (diff)
downloadansible-modules-core-9fd634396b22fb0967a15cb056d3ec153a58029c.tar.gz
Doc update to highlight use of body_type parameter
-rw-r--r--network/basics/uri.py45
1 files changed, 29 insertions, 16 deletions
diff --git a/network/basics/uri.py b/network/basics/uri.py
index a3f77919..41efe66b 100644
--- a/network/basics/uri.py
+++ b/network/basics/uri.py
@@ -151,27 +151,40 @@ EXAMPLES = '''
# Create a JIRA issue
-
-- uri: url=https://your.jira.example.com/rest/api/2/issue/
- method=POST user=your_username password=your_pass
- body="{{ lookup('file','issue.json') }}" force_basic_auth=yes
- status_code=201 HEADER_Content-Type="application/json"
+- uri:
+ url: https://your.jira.example.com/rest/api/2/issue/
+ method: POST
+ user: your_username
+ password: your_pass
+ body: "{{ lookup('file','issue.json') }}"
+ force_basic_auth: yes
+ status_code: 201
+ body_format: json
# Login to a form based webpage, then use the returned cookie to
# access the app in later tasks
-
-- uri: url=https://your.form.based.auth.examle.com/index.php
- method=POST body="name=your_username&password=your_password&enter=Sign%20in"
- status_code=302 HEADER_Content-Type="application/x-www-form-urlencoded"
- register: login
-
-- uri: url=https://your.form.based.auth.example.com/dashboard.php
- method=GET return_content=yes HEADER_Cookie="{{login.set_cookie}}"
+- uri:
+ url: https://your.form.based.auth.examle.com/index.php
+ method: POST
+ body: "name=your_username&password=your_password&enter=Sign%20in"
+ status_code: 302
+ HEADER_Content-Type: "application/x-www-form-urlencoded"
+ register: login
+
+- uri:
+ url: https://your.form.based.auth.example.com/dashboard.php
+ method: GET
+ return_content: yes
+ HEADER_Cookie: "{{login.set_cookie}}"
# Queue build of a project in Jenkins:
-
-- uri: url=http://{{jenkins.host}}/job/{{jenkins.job}}/build?token={{jenkins.token}}
- method=GET user={{jenkins.user}} password={{jenkins.password}} force_basic_auth=yes status_code=201
+- uri:
+ url: "http://{{ jenkins.host }}/job/{{ jenkins.job }}/build?token={{ jenkins.token }}"
+ method: GET
+ user: "{{ jenkins.user }}"
+ password: "{{ jenkins.password }}"
+ force_basic_auth: yes
+ status_code: 201
'''