From 5636580f4d8ae18149ff7d0396bc94ceb371a176 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Tue, 21 Apr 2020 23:12:33 +0200 Subject: [PATCH 1/2] permit to use existing lvm --- README.md | 2 +- requirements.yml | 6 ++++++ tasks/pools.yml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 requirements.yml diff --git a/README.md b/README.md index 4972a67..1dd79b0 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ should be a dict containing the following items: - `owner` The owner of the pool. (only `dir`) - `group` The group of the pool. (only `dir`) - `source` The name of the volume group. (only `lvm2`) -- `pvs` A list of physical volumes the volume group consists of. (only `lvm2`) +- `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. `libvirt_host_networks` is a list of networks to define and start. Each item should be a dict containing the following items: diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..bb31ec7 --- /dev/null +++ b/requirements.yml @@ -0,0 +1,6 @@ +--- +roles: + # Install a role from Ansible Galaxy. + - name: tcharl.ansible_manage_lvm + source: https://galaxy.ansible.com + path: ../community diff --git a/tasks/pools.yml b/tasks/pools.yml index 68fad86..e3946f0 100644 --- a/tasks/pools.yml +++ b/tasks/pools.yml @@ -14,7 +14,7 @@ lvg: vg: "{{ item.source }}" pvs: "{{ item.pvs }}" - when: item.type == "lvm2" + when: item.type == "lvm2" and item.pvs is defined with_items: "{{ libvirt_host_pools }}" become: True From 701335821006f9d60b6bd73bd8ee7e8170bf8684 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Tue, 21 Apr 2020 23:13:05 +0200 Subject: [PATCH 2/2] remove unrequired requirement --- requirements.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 requirements.yml diff --git a/requirements.yml b/requirements.yml deleted file mode 100644 index bb31ec7..0000000 --- a/requirements.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -roles: - # Install a role from Ansible Galaxy. - - name: tcharl.ansible_manage_lvm - source: https://galaxy.ansible.com - path: ../community