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:
|
||||
- not storage_longhorn|bool
|
||||
|
||||
- name: longhorn need to be {{ storage_longhorn_state }}
|
||||
- name: longhorn need to be present
|
||||
k8s:
|
||||
state: "{{ storage_longhorn_state }}"
|
||||
state: present
|
||||
context: "{{ my_context }}"
|
||||
merge_type: merge
|
||||
namespace: longhorn-system
|
||||
resource_definition: "{{ lookup('file', 'longhorn/' + item) | from_yaml }}"
|
||||
with_items:
|
||||
- "{{ 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 }}
|
||||
k8s:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue