ansible-role-k8s-storage/tasks/main.yml
Adrien Reslinger fdbebb2d57
All checks were successful
continuous-integration/drone/push Build is passing
Deploy longhorn with helm
2021-02-01 22:16:42 +01:00

41 lines
1.1 KiB
YAML

- name: Local Path setup
block:
# - include_tasks: "manual.yml"
- include_tasks: "local.yml"
- include_tasks: "longhorn.yml"
tags:
- longhorn
- storage
- include_tasks: "nfs.yml"
- 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"