added ebs hostpath storage
This commit is contained in:
38
ansible/roles/k8s_storage_ebs_manifests/tasks/main.yaml
Normal file
38
ansible/roles/k8s_storage_ebs_manifests/tasks/main.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
---
|
||||
- name: create target directory for open-ebs files
|
||||
become: false
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_search_path[0] }}/files/ebs"
|
||||
state: directory
|
||||
mode: 0775
|
||||
|
||||
- name: download the open-ebs operator (lite) manifest
|
||||
become: false
|
||||
ansible.builtin.uri:
|
||||
url: "https://openebs.github.io/charts/{{ item }}"
|
||||
dest: "{{ ansible_search_path[0] }}/files/ebs/{{ item }}"
|
||||
creates: "{{ ansible_search_path[0] }}/files/ebs/{{ item }}"
|
||||
mode: 0664
|
||||
with_items:
|
||||
- openebs-operator-lite.yaml
|
||||
|
||||
- name: template out the open-ebs storage class definitions
|
||||
ansible.builtin.template:
|
||||
src: ebs_storage_class.yaml.j2
|
||||
dest: "{{ ansible_search_path[0] }}/files/ebs/ebs_storage_class_{{ item }}.yaml"
|
||||
with_items:
|
||||
- ssd
|
||||
- hdd
|
||||
|
||||
- name: install the open-ebs operator (lite)
|
||||
kubernetes.core.k8s:
|
||||
src: "{{ ansible_search_path[0] }}/files/ebs/openebs-operator-lite.yaml"
|
||||
state: present
|
||||
|
||||
- name: install the open-ebs storage classes
|
||||
kubernetes.core.k8s:
|
||||
src: "{{ ansible_search_path[0] }}/files/ebs/ebs_storage_class_{{ item }}.yaml"
|
||||
state: present
|
||||
with_items:
|
||||
- ssd
|
||||
- hdd
|
Reference in New Issue
Block a user