blob: 7fb66b87757812cdcdfa02436ecdd4175869ce84 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
---
- name: "Create LVM volume group for PVE storage"
become: true
community.general.lvg:
vg: "{{ pve_storage_name }}"
pvs: "{{ pve_storage_device }}"
state: present
tags:
- "molecule-notest"
- name: "Create LVM thin pool for PVE storage"
become: true
community.general.lvol:
vg: "{{ pve_storage_name }}"
lv: "{{ pve_storage_pool }}"
size: "100%FREE"
opts: "--type thin-pool"
shrink: false
state: present
tags:
- "molecule-notest"
- name: "Register local-lvm storage in PVE"
become: true
ansible.builtin.command:
cmd: "pvesm add lvmthin local-lvm --vgname {{ pve_storage_name }} --thinpool {{ pve_storage_pool }}"
register: pve_pvesm_add
changed_when: pve_pvesm_add.rc == 0
failed_when: pve_pvesm_add.rc != 0 and 'already defined' not in pve_pvesm_add.stderr
tags:
- "molecule-notest"
|