ganeti-ansible/roles/node/tasks/storage.yml

22 lines
578 B
YAML
Raw Normal View History

2024-11-26 14:56:58 +00:00
- name: Create zpool
ansible.builtin.command:
cmd: zpool create {{ zpool_name }} {{ zpool_dev }}
creates: /{{ zpool_name }}
- name: Check if the folder exists
ansible.builtin.stat:
path: /usr/share/ganeti/extstorage/zfs
register: folder_check
- name: Reinstall lvm2 if ZFS extstorage is installed
ansible.builtin.command:
cmd: apt reinstall lvm2
register: lvm2_reinstall_result
changed_when: lvm2_reinstall_result.rc == 0
when: folder_check.stat.exists
- name: Create LVM vg
community.general.lvg:
vg: "{{ vg_name }}"
pvs: "{{ pvs }}"