mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Examples syntax batch6 (#5623)
* Change example syntax on os_auth module * Change example syntax on os_client_config module * Change example syntax on os_image_facts module * Change example syntax on os_networks_facts module * Change example syntax on os_nova_flavor module * Change example syntax on os_object module * Change example syntax on os_server module * Change example syntax on os_subnet_facts module * Change example syntax on rax_files module * Change example syntax on rax_files_objects module * Change example syntax on mysql_db module * Change example syntax on file module * Change example syntax on uri module * Change example syntax on cl_bond module * Change example syntax on cl_bridge module * Change example syntax on cl_img_install module * Change example syntax on cl_interface module * Change example syntax on cl_license module * Change example syntax on cl_ports module * Remove trailing colon
This commit is contained in:
parent
4c3f8cbd92
commit
895179929c
19 changed files with 456 additions and 318 deletions
|
@ -152,20 +152,24 @@ author: "Romeo Theriault (@romeotheriault)"
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Check that you can connect (GET) to a page and it returns a status 200
|
||||
- uri: url=http://www.example.com
|
||||
- name: Check that you can connect (GET) to a page and it returns a status 200
|
||||
uri:
|
||||
url: 'http://www.example.com'
|
||||
|
||||
# Check that a page returns a status 200 and fail if the word AWESOME is not
|
||||
# in the page contents.
|
||||
- action: uri url=http://www.example.com return_content=yes
|
||||
- uri:
|
||||
url: http://www.example.com
|
||||
return_content: yes
|
||||
register: webpage
|
||||
|
||||
- action: fail
|
||||
- name: Fail if AWESOME is not in the page content
|
||||
fail:
|
||||
when: "'AWESOME' not in webpage.content"
|
||||
|
||||
|
||||
# Create a JIRA issue
|
||||
- uri:
|
||||
- name: Create a JIRA issue
|
||||
uri:
|
||||
url: https://your.jira.example.com/rest/api/2/issue/
|
||||
method: POST
|
||||
user: your_username
|
||||
|
@ -192,8 +196,8 @@ EXAMPLES = '''
|
|||
return_content: yes
|
||||
HEADER_Cookie: "{{login.set_cookie}}"
|
||||
|
||||
# Queue build of a project in Jenkins:
|
||||
- uri:
|
||||
- name: Queue build of a project in Jenkins
|
||||
uri:
|
||||
url: "http://{{ jenkins.host }}/job/{{ jenkins.job }}/build?token={{ jenkins.token }}"
|
||||
method: GET
|
||||
user: "{{ jenkins.user }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue