An Ansible module that enables Continuous Delivery with Red Hat 3scale API Management Platform (3scale AMP)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

34 lines
1.2 KiB

---
- debug:
var: threescale_cicd_smoke_test_headers
verbosity: 1
- debug:
msg: "Starting a smoke test on '{{ threescale_cicd_smoke_test_url }}'..."
- name: Running smoke tests !
uri:
url: '{{ threescale_cicd_smoke_test_url }}'
headers: '{{ threescale_cicd_smoke_test_headers }}'
validate_certs: no
method: GET
register: threescale_cicd_tmpresponse
retries: '{{ threescale_cicd_retries }}'
delay: '{{ threescale_cicd_delay }}'
# temporary fix for https://github.com/ansible/ansible/issues/28078
until: 'threescale_cicd_tmpresponse is success'
- name: Running smoke tests (CORS) !
uri:
url: '{{ threescale_cicd_smoke_test_url }}'
headers: '{{ threescale_cicd_smoke_test_headers|combine({ ''Origin'': threescale_cicd_smoke_test_url, ''Access-Control-Request-Method'': ''GET'' }) }}'
validate_certs: no
method: OPTIONS
status_code: 200,204
register: threescale_cicd_tmpresponse
retries: '{{ threescale_cicd_retries }}'
delay: '{{ threescale_cicd_delay }}'
# temporary fix for https://github.com/ansible/ansible/issues/28078
until: 'threescale_cicd_tmpresponse is success'
when: 'threescale_cicd_apicast_policies_cors|bool'