- name: Local Path setup block: - name: Define Manual StorageClass k8s: state: present context: "{{ my_context }}" definition: kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: manual provisioner: kubernetes.io/no-provisioner volumeBindingMode: WaitForFirstConsumer when: - storage_manual|bool tags: - manual - storage - include_tasks: "local-path.yml" tags: - local-path - storage - include_tasks: "longhorn.yml" tags: - longhorn - storage - include_tasks: "nfs.yml" tags: - nfs - storage # https://medium.com/asl19-developers/create-readwritemany-persistentvolumeclaims-on-your-kubernetes-cluster-3a8db51f98e3 # https://github.com/ctrox/csi-s3 # https://github.com/kahing/goofys # https://github.com/reactr-io/gocachefs - include_tasks: "digital_ocean.yml" - include_tasks: "linode.yml" - include_tasks: "secrets-store.yml" - name: Select the default StorageClass k8s: state: present context: "{{ my_context }}" definition: apiVersion: v1 kind: StorageClass metadata: name: "{{ storage_default_storageclass }}" annotations: storageclass.kubernetes.io/is-default-class: "true" when: - storage_default_storageclass is defined - name: Select the default VolumeSnapshotClass k8s: state: present context: "{{ my_context }}" definition: apiVersion: v1 kind: VolumeSnapshotClass metadata: name: "{{ storage_default_storageclass }}" annotations: snapshot.storage.kubernetes.io/is-default-class: "true" when: - storage_default_storageclass is defined - storage_default_storageclass == "do-block-storage"