This commit is contained in:
parent
59de075a0a
commit
8ddacfec51
28 changed files with 610 additions and 21 deletions
35
tasks/longhorn.yml
Normal file
35
tasks/longhorn.yml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
- name: Include file list
|
||||
include_vars: "longhorn.yaml"
|
||||
|
||||
- name: Defined longhorn state to present
|
||||
set_fact:
|
||||
storage_longhorn_state: present
|
||||
when:
|
||||
- storage_longhorn|bool
|
||||
|
||||
- name: Define state of longhorn to absent
|
||||
set_fact:
|
||||
storage_longhorn_state: absent
|
||||
when:
|
||||
- not storage_longhorn|bool
|
||||
|
||||
- name: longhorn need to be {{ storage_longhorn_state }}
|
||||
k8s:
|
||||
state: "{{ storage_longhorn_state }}"
|
||||
context: "{{ my_context }}"
|
||||
merge_type: merge
|
||||
namespace: longhorn-system
|
||||
resource_definition: "{{ lookup('file', 'longhorn/' + item) | from_yaml }}"
|
||||
with_items:
|
||||
- "{{ storage_longhorn_files_list }}"
|
||||
|
||||
- name: Ingress for longhorn UI need to be {{ storage_longhorn_state }}
|
||||
k8s:
|
||||
state: "{{ storage_longhorn_state }}"
|
||||
context: "{{ my_context }}"
|
||||
merge_type: merge
|
||||
namespace: longhorn-system
|
||||
resource_definition: "{{ lookup('template', 'longhorn/' + item) | from_yaml }}"
|
||||
with_items:
|
||||
- "longhorn_ingressroute.yaml.j2"
|
||||
Loading…
Add table
Add a link
Reference in a new issue