- name: Set up Scylla Operator, NodeConfig, and the Local CSI Driver hosts: init become: true vars: scylla_crds: - scyllaclusters.scylla.scylladb.com - nodeconfigs.scylla.scylladb.com - scyllaoperatorconfigs.scylla.scylladb.com - scylladbmonitorings.scylla.scylladb.com scylla_deployments: - scylla-operator - webhook-server tasks: - name: Apply Scylla Operator YAML ansible.builtin.command: | kubectl apply --server-side -f /tmp/k8s/ansible/scylla/03-scylla-operator.yml -n scylla-operator environment: KUBECONFIG: /etc/rancher/k3s/k3s.yaml changed_when: false - name: Wait for Scylla Operator CRDs ansible.builtin.shell: | kubectl wait --for='condition=established' crd/{{ scylla_crds | join(' crd/') }} changed_when: false - name: Wait for Scylla Operator Deployments ansible.builtin.shell: | kubectl -n scylla-operator rollout status --timeout=10m deployment.apps/{{ item }} loop: "{{ scylla_deployments }}" loop_control: loop_var: item environment: KUBECONFIG: /etc/rancher/k3s/k3s.yaml changed_when: false - name: Apply Scylla NodeConfig YAML kubernetes.core.k8s: state: present src: "/tmp/k8s/ansible/scylla/04-scylla-node-config.yml" namespace: scylla-operator kubeconfig: /etc/rancher/k3s/k3s.yaml - name: Wait for Scylla NodeConfig to be applied across all nodes ansible.builtin.command: | kubectl wait --for='condition=Reconciled' --timeout=10m nodeconfigs.scylla.scylladb.com/scylladb-nodepool-1 changed_when: false - name: Find Scylla CSI Driver K8s YAMLs on Remote Host ansible.builtin.find: paths: /tmp/k8s/ansible/scylla patterns: "05-*.yml" file_type: file register: scylla_csi_driver_files - name: Apply all Scylla CSI Driver K8s YAMLs kubernetes.core.k8s: state: present src: "{{ item.path }}" kubeconfig: /etc/rancher/k3s/k3s.yaml loop: "{{ scylla_csi_driver_files.files | sort(attribute='path') }}" loop_control: label: "{{ item.path }}" - name: Wait for Local CSI Driver DaemonSet ansible.builtin.command: | kubectl -n=local-csi-driver rollout status --timeout=10m daemonset.apps/local-csi-driver changed_when: false