Skip to content

Commit

Permalink
remove redundant volume group task
Browse files Browse the repository at this point in the history
  • Loading branch information
Tcharl committed May 12, 2020
1 parent 366749d commit c75e6b0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 18 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ installed.
Dependencies
------------

None
* [The LVM role](https://github.com/mrlesmithjr/ansible-manage-lvm) You can install it using `ansible-galaxy install -r requirements.yml --roles-p ../community`

Example Playbook
----------------
Expand All @@ -91,6 +91,11 @@ Example Playbook
hosts: all
roles:
- role: stackhpc.libvirt-host
lvm_groups: # see according properties on [The LVM role](https://github.com/mrlesmithjr/ansible-manage-lvm)
- vgname: libvirtvg
disks:
- /dev/sdb1
create: true
libvirt_host_pools:
- name: my-pool
type: dir
Expand All @@ -101,10 +106,7 @@ Example Playbook
group: my-group
- name: lvm_pool
type: lvm2
source: vg1
target: /dev/vg1
pvs:
- /dev/sda3
source: libvirtvg
libvirt_host_networks:
- name: br-example
mode: bridge
Expand Down
5 changes: 2 additions & 3 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
vars:
manage_lvm: true
lvm_groups:
- vgname: libvirtpool
- vgname: libvirt_vg
disks:
- /dev/sdb1
create: true
lvnames: []
users_group_list:
- name: libvirt
systemusers_user_list:
Expand All @@ -18,7 +17,7 @@
libvirt_host_pools:
- name: libvirt_vg
type: lvm2
source: libvirtpool
source: libvirt_vg
libvirt_host_networks:
- name: ansible-virtualization-bridge
mode: bridge
Expand Down
Binary file not shown.
Binary file not shown.
3 changes: 1 addition & 2 deletions molecule/kvm/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
vars:
manage_lvm: true
lvm_groups:
- vgname: libvirtpool
- vgname: libvirt_vg
disks:
- /dev/vdb
create: true
lvnames: []
users_group_list:
- name: libvirt
systemusers_user_list:
Expand Down
8 changes: 0 additions & 8 deletions tasks/pools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@
with_items: "{{ libvirt_host_pools }}"
become: True

- name: Ensure libvirt lvm2 storage pool directories exist
lvg:
vg: "{{ item.source }}"
pvs: "{{ item.pvs }}"
when: item.type == "lvm2" and item.pvs is defined
with_items: "{{ libvirt_host_pools }}"
become: True

- name: Ensure libvirt storage pools are defined
virt_pool:
name: "{{ item.name }}"
Expand Down

0 comments on commit c75e6b0

Please sign in to comment.