| | |
| | | --- |
| | | - name: Copying templates to bastion |
| | | synchronize: |
| | | src: "{{ role_path }}/files" |
| | | dest: /tmp/ceph-templates |
| | | |
| | | - name: "{{ ceph_workload_title }} common resources for Ceph" |
| | | shell: "oc apply -f /tmp/ceph-templates/files/{{ item }}" |
| | | - name: "{{ ceph_workload_title }} Ceph common resources" |
| | | k8s: |
| | | state: "{{ ceph_workload_state }}" |
| | | definition: "{{ lookup('file', item) }}" |
| | | loop: |
| | | - "common.yaml" |
| | | - "rbd/" |
| | | - "cephfs/" |
| | | when: not ceph_workload_destroy |
| | | - "cephfs/csi-node-plugin-psp.yaml" |
| | | - "cephfs/csi-nodeplugin-rbac.yaml" |
| | | - "cephfs/csi-provisioner-psp.yaml" |
| | | - "cephfs/csi-provisioner-rbac.yaml" |
| | | - "rbd/csi-node-plugin-psp.yaml" |
| | | - "rbd/csi-nodeplugin-rbac.yaml" |
| | | - "rbd/csi-provisioner-psp.yaml" |
| | | - "rbd/csi-provisioner-rbac.yaml" |
| | | tags: |
| | | - ceph_common_dep |
| | | |
| | | - name: "{{ ceph_workload_title }} common resources for Ceph" |
| | | shell: "oc delete -f /tmp/ceph-templates/files/{{ item }}" |
| | | loop: |
| | | - "rbd/" |
| | | - "cephfs/" |
| | | - "common.yaml" |
| | | ignore_errors: true |
| | | when: ceph_workload_destroy |
| | | |
| | | - name: "{{ ceph_workload_title }} common resources for Ceph" |
| | | - name: "{{ ceph_workload_title }} Ceph operator and cluster" |
| | | k8s: |
| | | state: "{{ ceph_workload_state }}" |
| | | definition: "{{ lookup('template', item) }}" |
| | |
| | | shell: "oc get pods -o json --selector=app=rook-ceph-mon -n rook-ceph" |
| | | register: mon_pods |
| | | until: mon_pods.stdout|from_json|json_query('items[*].status.phase')|unique == ["Running"] |
| | | retries: 10 |
| | | delay: 12 |
| | | when: not ceph_workload_destroy |
| | | retries: 12 |
| | | delay: 24 |
| | | when: not ceph_workload_destroy | bool |
| | | |
| | | - name: "Waiting for OSD pods to come up..." |
| | | shell: "oc get pods -o json --selector=app=rook-ceph-osd -n rook-ceph" |
| | | register: osd_pods |
| | | until: osd_pods.stdout|from_json|json_query('items[*].status.phase')|unique == ["Running"] |
| | | retries: 10 |
| | | delay: 12 |
| | | when: not ceph_workload_destroy |
| | | retries: 12 |
| | | delay: 24 |
| | | when: not ceph_workload_destroy | bool |