Now i can remove longhorn if needed
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
31e70b162a
commit
ddb9600a9d
1 changed files with 16 additions and 2 deletions
|
|
@ -14,15 +14,29 @@
|
||||||
when:
|
when:
|
||||||
- not storage_longhorn|bool
|
- not storage_longhorn|bool
|
||||||
|
|
||||||
- name: longhorn need to be {{ storage_longhorn_state }}
|
- name: longhorn need to be present
|
||||||
k8s:
|
k8s:
|
||||||
state: "{{ storage_longhorn_state }}"
|
state: present
|
||||||
context: "{{ my_context }}"
|
context: "{{ my_context }}"
|
||||||
merge_type: merge
|
merge_type: merge
|
||||||
namespace: longhorn-system
|
namespace: longhorn-system
|
||||||
resource_definition: "{{ lookup('file', 'longhorn/' + item) | from_yaml }}"
|
resource_definition: "{{ lookup('file', 'longhorn/' + item) | from_yaml }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ storage_longhorn_files_list }}"
|
- "{{ storage_longhorn_files_list }}"
|
||||||
|
when:
|
||||||
|
- storage_longhorn|bool
|
||||||
|
|
||||||
|
- name: longhorn need to be absent
|
||||||
|
k8s:
|
||||||
|
state: absent
|
||||||
|
context: "{{ my_context }}"
|
||||||
|
merge_type: merge
|
||||||
|
namespace: longhorn-system
|
||||||
|
resource_definition: "{{ lookup('file', 'longhorn/' + item) | from_yaml }}"
|
||||||
|
with_items:
|
||||||
|
- "{{ storage_longhorn_files_list | reverse | list }}"
|
||||||
|
when:
|
||||||
|
- not storage_longhorn|bool
|
||||||
|
|
||||||
- name: Ingress for longhorn UI need to be {{ storage_longhorn_state }}
|
- name: Ingress for longhorn UI need to be {{ storage_longhorn_state }}
|
||||||
k8s:
|
k8s:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue