1
0
IaC/ansible/roles/k8s_storage_ebs_deploy/tasks/main.yaml

46 lines
1.3 KiB
YAML
Raw Normal View History

2022-11-09 07:09:46 -05:00
---
2022-12-05 07:56:55 -05:00
- name: setup disks for ebs
ansible.builtin.include_tasks:
file: disks.yaml
with_items:
- "{{ groups['k8s_storage'] }}"
loop_control:
loop_var: node
2022-11-09 07:09:46 -05:00
- 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