diff --git a/tasks/longhorn.yml b/tasks/longhorn.yml index 5957907..c00c6cb 100644 --- a/tasks/longhorn.yml +++ b/tasks/longhorn.yml @@ -96,6 +96,27 @@ with_items: # - "longhorn_ingressroute.yaml.j2" - "longhorn-namespace.yml.j2" + + - name: Remove longhorn-crypt StorageClass + kubernetes.core.k8s: + state: absent + context: "{{ my_context }}" + definition: + apiVersion: storage.k8s.io/v1 + kind: StorageClass + metadata: + name: longhorn-crypt + + # - name: Remove longhorn Recurring Jobs + # kubernetes.core.k8s: + # state: absent + # context: "{{ my_context }}" + # namespace: "{{ storage_longhorn_namespace }}" + # resource_definition: "{{ lookup('template', 'longhorn/longhorn_recurringjob.yml.j2') | from_yaml }}" + # with_items: + # - { name: "snapshot", cron: "1 * * * *", task: "snapshot", retain: 25 } + # - { name: "backup-daily", cron: "0 1 * * *", task: "backup", retain: 8 } + when: - not storage_longhorn_enabled tags: