| | |
| | | --- |
| | | # Implement your Post Workload deployment tasks here |
| | | |
| | | - name: Alternative to volumeBindingMode=WaitForFirstConsumer |
| | | k8s: |
| | | state: present |
| | | merge_type: |
| | | - strategic-merge |
| | | - merge |
| | | definition: "{{ lookup('template', './templates/cm-custom-codeready.j2' ) | from_yaml }}" |
| | | when: _on_rhpds_aws|bool |
| | | - name: Restart CodeReady Pod |
| | | k8s: |
| | | state: absent |
| | | api_version: v1 |
| | | kind: Pod |
| | | name: "codeready" |
| | | namespace: "workspaces" |
| | | when: _on_rhpds_aws|bool |
| | | - name: Wait for CodeReady Pod to start |
| | | k8s: |
| | | api_version: v1 |
| | | kind: Pod |
| | | name: "codeready" |
| | | namespace: "workspaces" |
| | | register: codeready_pod |
| | | until: |
| | | - codeready_pod.result is defined |
| | | - codeready_pod.result.status.phase == "Running" |
| | | retries: 50 |
| | | delay: 10 |
| | | changed_when: false |
| | | when: _on_rhpds_aws|bool |
| | | - name: Wait for the CodeReady Pod to be ready |
| | | k8s: |
| | | api_version: v1 |
| | | kind: Pod |
| | | name: "codeready" |
| | | namespace: "workspaces" |
| | | register: codeready_pod |
| | | until: |
| | | - codeready_pod.result.status.containerStatuses[0].ready|d(False)|bool |
| | | retries: 50 |
| | | delay: 10 |
| | | changed_when: false |
| | | when: _on_rhpds_aws|bool |
| | | |
| | | - name: Alternative to volumeBindingMode=WaitForFirstConsumer for CRW |
| | | when: |
| | | - _deploy_instance|bool |
| | | - _on_rhpds_aws|bool |
| | | block: |
| | | - name: Update Custom ConfigMap |
| | | k8s: |
| | | state: present |
| | | merge_type: |
| | | - strategic-merge |
| | | - merge |
| | | definition: "{{ lookup('template', './templates/cm-custom-codeready.j2' ) | from_yaml }}" |
| | | - name: Restart CodeReady Pod |
| | | k8s: |
| | | state: absent |
| | | api_version: v1 |
| | | kind: Pod |
| | | name: "codeready" |
| | | namespace: "workspaces" |
| | | - name: Wait for CodeReady Pod to start |
| | | k8s: |
| | | api_version: v1 |
| | | kind: Pod |
| | | name: "codeready" |
| | | namespace: "workspaces" |
| | | register: codeready_pod |
| | | until: |
| | | - codeready_pod.result is defined |
| | | - codeready_pod.result.status.phase == "Running" |
| | | retries: 50 |
| | | delay: 10 |
| | | changed_when: false |
| | | - name: Wait for the CodeReady Pod to be ready |
| | | k8s: |
| | | api_version: v1 |
| | | kind: Pod |
| | | name: "codeready" |
| | | namespace: "workspaces" |
| | | register: codeready_pod |
| | | until: |
| | | - codeready_pod.result.status.containerStatuses[0].ready|d(False)|bool |
| | | retries: 50 |
| | | delay: 10 |
| | | changed_when: false |
| | | |
| | | # Leave this as the last task in the playbook. |
| | | - name: post_workload tasks complete |
| | | debug: |