Browse Source

get rid of the post-install playbook to prevent from reaching recursion limits

master
Nicolas Massé 9 years ago
parent
commit
e65f5cbcc0
  1. 23
      roles/3scale/tasks/main.yml
  2. 19
      roles/3scale/tasks/post-install.yml

23
roles/3scale/tasks/main.yml

@ -198,11 +198,28 @@
microcks: http://{{ microcks_hostname }} microcks: http://{{ microcks_hostname }}
tags: vars tags: vars
- include: post-install.yml - set_fact:
tags: post-install
vars:
threescale_admin_hostname: '{{ route.stdout }}' threescale_admin_hostname: '{{ route.stdout }}'
threescale_backend_map: '{{ threescale_default_backend_map |combine(threescale_additional_backend_map|default({})) }}' threescale_backend_map: '{{ threescale_default_backend_map |combine(threescale_additional_backend_map|default({})) }}'
tags: vars
- name: Get the 3scale Administration Access Token
command: oc get dc system-app -n "{{ threescale_project }}" -o 'jsonpath={.spec.template.spec.containers[0].env[?(@.name=="ADMIN_ACCESS_TOKEN")].value}'
register: oc_get_dc
tags: vars
changed_when: false
- set_fact:
access_token: '{{ oc_get_dc.stdout }}'
tags: vars
- include: 3scale_status.yml
- include: create_api.yml
with_items: '{{ threescale_apis_to_create }}'
- include: oauth-client.yml
tags: oauth-client
- name: Get Admin Username - name: Get Admin Username
command: oc get dc system-app -n "{{ threescale_project }}" -o 'jsonpath={.spec.template.spec.containers[0].env[?(@.name=="USER_LOGIN")].value}' command: oc get dc system-app -n "{{ threescale_project }}" -o 'jsonpath={.spec.template.spec.containers[0].env[?(@.name=="USER_LOGIN")].value}'

19
roles/3scale/tasks/post-install.yml

@ -1,19 +0,0 @@
---
- name: Get the 3scale Administration Access Token
command: oc get dc system-app -n "{{ threescale_project }}" -o 'jsonpath={.spec.template.spec.containers[0].env[?(@.name=="ADMIN_ACCESS_TOKEN")].value}'
register: oc_get_dc
tags: vars
changed_when: false
- set_fact:
access_token: '{{ oc_get_dc.stdout }}'
tags: vars
- include: 3scale_status.yml
- include: create_api.yml
with_items: '{{ threescale_apis_to_create }}'
- include: oauth-client.yml
tags: oauth-client
Loading…
Cancel
Save