My Ansible Playbook to install an OpenShift Lab
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.

29 lines
1.1 KiB

---
- name: Get a list of available services
uri:
url: "https://{{ threescale_admin_hostname }}/admin/api/services.json?access_token={{ access_token }}"
validate_certs: no
register: response
- set_fact:
services: '{{ response.json|json_query(''services[*].service.system_name'') }}'
services_details: '{{ response.json|json_query(''services[].{"system_name": service.system_name, "id": service.id}'') }}'
- name: Get the list of existing applications
uri:
url: https://{{ threescale_admin_hostname }}/admin/api/applications.json?access_token={{ access_token|urlencode }}
validate_certs: no
register: response
- set_fact:
applications: '{{ response.json|json_query(''applications[*].application.name'') }}'
- name: Get the default (first) account
uri:
url: https://{{ threescale_admin_hostname }}/admin/api/accounts.json?access_token={{ access_token|urlencode }}&state=approved&page=1&per_page=1
validate_certs: no
register: response
- set_fact:
account_id: '{{ response.json.accounts[0].account.id }}'