threescale_cicd_existing_application_plans:'{{ threescale_cicd_tmpresponse.json|json_query(''plans[*].application_plan.system_name'') if threescale_cicd_api_system_name in threescale_cicd_existing_services else [] }}'
threescale_cicd_existing_application_plans_details:'{{ threescale_cicd_tmpresponse.json|json_query(''plans[].{"system_name": application_plan.system_name, "id": application_plan.id}'') if threescale_cicd_api_system_name in threescale_cicd_existing_services else [] }}'
- name:Set the list of existing application plans as a fact
msg:'You have {{ threescale_cicd_api_security_requirements|length }} global security requirements. There must be one and only one security requirement.'
msg:>-
You have {{ threescale_cicd_api_security_requirements|length }} global security requirements.
There must be one and only one security requirement.
- name:Make sure the security scheme is consistent with 3scale
- name:Make sure the security scheme is consistent with 3scale
assert:
assert:
that:
that:
- '''type'' in threescale_cicd_api_security_scheme and threescale_cicd_api_security_scheme.type == ''apiKey'' or (threescale_cicd_api_security_scheme.type == ''oauth2'' and threescale_cicd_sso_issuer_endpoint is defined)'
- >-
msg:|-
'type'in threescale_cicd_api_security_scheme and threescale_cicd_api_security_scheme.type == 'apiKey'
or (threescale_cicd_api_security_scheme.type == 'oauth2' and threescale_cicd_sso_issuer_endpoint is defined)
msg:>-
The embedded security definition {{ threescale_cicd_api_security_scheme_name }} is not compatible with 3scale.
The embedded security definition {{ threescale_cicd_api_security_scheme_name }} is not compatible with 3scale.
Please make sure you chose an "apiKey" or "oauth2" scheme.
Please make sure you chose an "apiKey" or "oauth2" scheme.
Also, if you chose "oauth2", you will need to pass the threescale_cicd_sso_issuer_endpoint extra variable.
Also, if you chose "oauth2", you will need to pass the threescale_cicd_sso_issuer_endpoint extra variable.
The security definition you chose:{{threescale_cicd_api_security_scheme|to_nice_json }}
The security definition you chose:{{threescale_cicd_api_security_scheme|to_nice_json }}
- assert:
- name:Make sure the Private Base URL is defined
assert:
that:
that:
- 'threescale_cicd_private_base_url is defined'
- 'threescale_cicd_private_base_url is defined'
msg:'Either the private base url or the tuple backend hostname/scheme must be declared as extra variables (either threescale_cicd_private_base_url or threescale_cicd_api_backend_scheme / threescale_cicd_api_backend_hostname)'
msg:>-
Either the private base url or the tuple backend hostname/scheme must be declared as extra variables
(either threescale_cicd_private_base_url or threescale_cicd_api_backend_scheme / threescale_cicd_api_backend_hostname)
- assert:
- name:Smoketests consistency
assert:
that:
that:
# Operation must exists
# Operation must exists
- 'threescale_cicd_openapi_smoketest_operation in threescale_cicd_api_operations'
- 'threescale_cicd_openapi_smoketest_operation in threescale_cicd_api_operations'
- threescale_cicd_access_token that contains an Access Token with Read/Write privileges on the 3scale Account Management API. This variable is usually set in your inventory file.
- threescale_cicd_access_token that contains an Access Token with Read/Write privileges on the 3scale Account Management API.
- threescale_cicd_openapi_file that is the path to the OpenAPI file you want to deploy in 3scale. This variable is usually passed as an extra variable (-e threescale_cicd_openapi_file=...)
This variable is usually set in your inventory file.
- threescale_cicd_openapi_file that is the path to the OpenAPI file you want to deploy in 3scale.
This variable is usually passed as an extra variable (-e threescale_cicd_openapi_file=...)
- name:Make sure the OpenAPI File Format is YAML or JSON
- name:Make sure the OpenAPI File Format is YAML or JSON
- name:Abort on deprecated feature -> the "sso" inventory group
- name:Abort on deprecated feature -> the "sso" inventory group
fail:
fail:
msg:>
msg:>-
You are currently using a deprecated feature (the 'sso' group in your inventory).
You are currently using a deprecated feature (the 'sso' group in your inventory).
Please replace it with the 'threescale_cicd_sso_issuer_endpoint' variable.
Please replace it with the 'threescale_cicd_sso_issuer_endpoint' variable.
Alternatively, you can also bypass this warning by setting the 'threescale_cicd_deprecated_features'
Alternatively, you can also bypass this warning by setting the 'threescale_cicd_deprecated_features'
extra variable to 'true'.
extra variable to 'true'.
when:'threescale_cicd_sso_issuer_endpoint|default("")|length > 0 and ''sso'' in groups and groups[''sso''] > 0 and threescale_cicd_api_backend_version == ''oidc'' and not threescale_cicd_deprecated_features|default(false)|bool'
when:>-
threescale_cicd_sso_issuer_endpoint|default("")|length > 0 and 'sso' in groups
and groups['sso'] > 0 and threescale_cicd_api_backend_version == 'oidc'
and not threescale_cicd_deprecated_features|default(false)|bool
- name:Abort on deprecated feature -> the "apicast-sandbox" inventory group
- name:Abort on deprecated feature -> the "apicast-sandbox" inventory group
fail:
fail:
msg:>
msg:>-
You are currently using a deprecated feature (the 'apicast-sandbox' group in your inventory).
You are currently using a deprecated feature (the 'apicast-sandbox' group in your inventory).
Please replace it with the 'threescale_cicd_apicast_sandbox_endpoint' variable.
Please replace it with the 'threescale_cicd_apicast_sandbox_endpoint' variable.
Alternatively, you can also bypass this warning by setting the 'threescale_cicd_deprecated_features'
Alternatively, you can also bypass this warning by setting the 'threescale_cicd_deprecated_features'
extra variable to 'true'.
extra variable to 'true'.
when:'threescale_cicd_apicast_sandbox_endpoint|default("")|length > 0 and ''apicast-sandbox'' in groups and groups[''apicast-sandbox''] > 0 and not threescale_cicd_deprecated_features|default(false)|bool'
when:>-
threescale_cicd_apicast_sandbox_endpoint|default("")|length > 0 and 'apicast-sandbox' in groups
and groups['apicast-sandbox'] > 0 and not threescale_cicd_deprecated_features|default(false)|bool
- name:Abort on deprecated feature -> the "apicast-production" inventory group
- name:Abort on deprecated feature -> the "apicast-production" inventory group
fail:
fail:
msg:>
msg:>-
You are currently using a deprecated feature (the 'apicast-production' group in your inventory).
You are currently using a deprecated feature (the 'apicast-production' group in your inventory).
Please replace it with the 'threescale_cicd_apicast_production_endpoint' variable.
Please replace it with the 'threescale_cicd_apicast_production_endpoint' variable.
Alternatively, you can also bypass this warning by setting the 'threescale_cicd_deprecated_features'
Alternatively, you can also bypass this warning by setting the 'threescale_cicd_deprecated_features'
extra variable to 'true'.
extra variable to 'true'.
when:'threescale_cicd_apicast_production_endpoint|default("")|length > 0 and ''apicast-production'' in groups and groups[''apicast-production''] > 0 and not threescale_cicd_deprecated_features|default(false)|bool'
when:>-
threescale_cicd_apicast_production_endpoint|default("")|length > 0 and 'apicast-production' in groups
and groups['apicast-production'] > 0 and not threescale_cicd_deprecated_features|default(false)|bool