ansible-role-k8s-storage/tasks/local.yml
Adrien 8ddacfec51
All checks were successful
continuous-integration/drone/push Build is passing
Add longhorn
2020-08-08 00:06:28 +02:00

24 lines
676 B
YAML

---
- name: Include file list
include_vars: "local.yaml"
- name: Defined local-path-storage state to present
set_fact:
storage_localpath_state: present
when:
- storage_localpath|bool
- name: find state of local-path-storage
set_fact:
storage_localpath_state: absent
when:
- not storage_localpath|bool
- name: local-path-storage need to be {{ storage_localpath_state }}
k8s:
state: "{{ storage_localpath_state }}"
context: "{{ my_context }}"
merge_type: merge
resource_definition: "{{ lookup('file', 'local/' + item) | from_yaml }}"
with_items:
- "{{ storage_localpath_files_list }}"