Skip to content

Commit 5636580

Browse files
committed
permit to use existing lvm
1 parent 1ccf881 commit 5636580

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ should be a dict containing the following items:
2323
- `owner` The owner of the pool. (only `dir`)
2424
- `group` The group of the pool. (only `dir`)
2525
- `source` The name of the volume group. (only `lvm2`)
26-
- `pvs` A list of physical volumes the volume group consists of. (only `lvm2`)
26+
- `pvs` A list of physical volumes the volume group consists of. (only `lvm2`). N.B. if specified, the lvg will be created on top of the PVS, otherwise the lv should have been created before.
2727

2828
`libvirt_host_networks` is a list of networks to define and start. Each item
2929
should be a dict containing the following items:

requirements.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
roles:
3+
# Install a role from Ansible Galaxy.
4+
- name: tcharl.ansible_manage_lvm
5+
source: https://galaxy.ansible.com
6+
path: ../community

tasks/pools.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
lvg:
1515
vg: "{{ item.source }}"
1616
pvs: "{{ item.pvs }}"
17-
when: item.type == "lvm2"
17+
when: item.type == "lvm2" and item.pvs is defined
1818
with_items: "{{ libvirt_host_pools }}"
1919
become: True
2020

0 commit comments

Comments
 (0)