| | |
| | | loop: |
| | | - ./templates/template_service_broker.j2 |
| | | |
| | | - name: Wait for Template Service Broker to be running |
| | | k8s_facts: |
| | | api_version: apps.openshift.io/v1 |
| | | kind: DeploymentConfig |
| | | namespace: "{{ _tsb_broker_project }}" |
| | | name: apiserver |
| | | register: r_tsb |
| | | retries: 30 |
| | | delay: 10 |
| | | until: r_tsb.resources[0].status.availableReplicas | int == 1 |
| | | |
| | | # Workaround to make Operator Pod pick up permissions from the service |
| | | # account. Without this the TSB will be running but not |
| | | # displaying any Templates in the Developer Catalog. |
| | | # Somehow killing the pod (and have it recreated via the Deployment) |
| | | # fixes the issue. |
| | | - name: Workaround - Get Operator Pod |
| | | k8s_facts: |
| | | api_version: v1 |
| | | kind: Pod |
| | | namespace: "{{ _tsb_broker_project }}" |
| | | label_selectors: |
| | | - name = openshift-template-service-broker-operator-alm-owned |
| | | register: r_operator_pod |
| | | |
| | | - name: Workaround - Kill Operator Pod |
| | | k8s: |
| | | state: absent |
| | | api_version: v1 |
| | | kind: Pod |
| | | namespace: "{{ _tsb_broker_project }}" |
| | | name: "{{ r_operator_pod.resources[0].metadata.name }}" |
| | | |
| | | # Leave this as the last task in the playbook. |
| | | - name: workload tasks complete |
| | | debug: |