10 changed files with 42 additions and 16 deletions
@ -1 +0,0 @@ |
|||||
localhost ansible_connection=local |
|
||||
@ -1 +0,0 @@ |
|||||
../../.. |
|
||||
@ -1,9 +0,0 @@ |
|||||
--- |
|
||||
|
|
||||
- name: Deploy the Echo API to a 3scale SaaS instance, with hosted APIcasts |
|
||||
hosts: threescale |
|
||||
gather_facts: no |
|
||||
vars: |
|
||||
threescale_cicd_openapi_file: '{{ playbook_dir }}/echo-api.yaml' |
|
||||
roles: |
|
||||
- threescale-cicd |
|
||||
@ -0,0 +1,14 @@ |
|||||
|
--- |
||||
|
|
||||
|
- name: Deploy the Echo API to a 3scale SaaS instance, with hosted APIcasts |
||||
|
hosts: threescale |
||||
|
gather_facts: no |
||||
|
vars: |
||||
|
threescale_cicd_openapi_file: '{{ playbook_dir }}/api/echo-api.yaml' |
||||
|
roles: |
||||
|
# Test first deployment |
||||
|
- { name: 'nmasse-itix.threescale-cicd', vars: { 'round': 1 } } |
||||
|
# Verify idempotence |
||||
|
- { name: 'nmasse-itix.threescale-cicd', vars: { 'round': 2 } } |
||||
|
post_tasks: |
||||
|
- import_tasks: 'cleanup.yaml' |
||||
@ -0,0 +1,20 @@ |
|||||
|
--- |
||||
|
|
||||
|
- name: Delete the created service and any dependent object |
||||
|
uri: |
||||
|
url: 'https://{{ inventory_hostname }}/admin/api/services/{{ threescale_cicd_api_service_id }}.json?access_token={{ threescale_cicd_access_token|urlencode }}' |
||||
|
validate_certs: no |
||||
|
method: DELETE |
||||
|
status_code: 200 |
||||
|
register: threescale_cicd_tmpresponse |
||||
|
changed_when: 'threescale_cicd_tmpresponse.status == 200' |
||||
|
when: 'threescale_cicd_api_service_id is defined' |
||||
|
- name: Delete the created ActiveDocs |
||||
|
uri: |
||||
|
url: 'https://{{ inventory_hostname }}/admin/api/active_docs/{{ threescale_cicd_api_activedocs_id }}.json?access_token={{ threescale_cicd_access_token|urlencode }}' |
||||
|
validate_certs: no |
||||
|
method: DELETE |
||||
|
status_code: 200 |
||||
|
register: threescale_cicd_tmpresponse |
||||
|
changed_when: 'threescale_cicd_tmpresponse.status == 200' |
||||
|
when: 'threescale_cicd_api_activedocs_id is defined' |
||||
@ -0,0 +1 @@ |
|||||
|
../.. |
||||
Loading…
Reference in new issue