Example cleanup.
This commit is contained in:
parent
5269216c41
commit
18b713fd74
1 changed files with 17 additions and 19 deletions
|
@ -143,31 +143,29 @@ EXAMPLES = '''
|
||||||
when: 'AWESOME' not in "{{ webpage.content }}"
|
when: 'AWESOME' not in "{{ webpage.content }}"
|
||||||
|
|
||||||
|
|
||||||
# Create a JIRA issue.
|
# Create a JIRA issue
|
||||||
- action: >
|
|
||||||
uri url=https://your.jira.example.com/rest/api/2/issue/
|
- uri: url=https://your.jira.example.com/rest/api/2/issue/
|
||||||
method=POST user=your_username password=your_pass
|
method=POST user=your_username password=your_pass
|
||||||
body="{{ lookup('file','issue.json') }}" force_basic_auth=yes
|
body="{{ lookup('file','issue.json') }}" force_basic_auth=yes
|
||||||
status_code=201 HEADER_Content-Type="application/json"
|
status_code=201 HEADER_Content-Type="application/json"
|
||||||
|
|
||||||
- action: >
|
# Login to a form based webpage, then use the returned cookie to
|
||||||
uri url=https://your.form.based.auth.examle.com/index.php
|
# 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"
|
method=POST body="name=your_username&password=your_password&enter=Sign%20in"
|
||||||
status_code=302 HEADER_Content-Type="application/x-www-form-urlencoded"
|
status_code=302 HEADER_Content-Type="application/x-www-form-urlencoded"
|
||||||
register: login
|
register: login
|
||||||
|
|
||||||
# Login to a form based webpage, then use the returned cookie to
|
- uri: url=https://your.form.based.auth.example.com/dashboard.php
|
||||||
# access the app in later tasks.
|
|
||||||
- action: uri url=https://your.form.based.auth.example.com/dashboard.php
|
|
||||||
method=GET return_content=yes HEADER_Cookie="{{login.set_cookie}}"
|
method=GET return_content=yes HEADER_Cookie="{{login.set_cookie}}"
|
||||||
|
|
||||||
# Queue build of a project in Jenkins:
|
# Queue build of a project in Jenkins:
|
||||||
- action: uri url=http://{{jenkins.host}}/job/{{jenkins.job}}/build?token={{jenkins.token}}
|
|
||||||
|
- 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
|
method=GET user={{jenkins.user}} password={{jenkins.password}} force_basic_auth=yes status_code=201
|
||||||
|
|
||||||
# Call Jenkins from host where you run ansible. Handy if the Jenkins host isn't reachable from the target machine:
|
|
||||||
- local_action: 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
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
HAS_HTTPLIB2 = True
|
HAS_HTTPLIB2 = True
|
||||||
|
|
Loading…
Reference in a new issue