adding lv and vm creation to beaker virthost
This commit is contained in:
parent
1a9231cf3e
commit
bddaf80c0a
2 changed files with 20 additions and 1 deletions
|
@ -10,8 +10,10 @@ clients:
|
|||
macaddress: "52:54:00:a2:de:30"
|
||||
memsize: 4096
|
||||
num_cpus: 2
|
||||
lvm_size: 20
|
||||
- hostname: virt02.qa.fedoraproject.org
|
||||
macaddress: "52:54:00:fe:22:ff"
|
||||
memsize: 4096
|
||||
num_cpus: 2
|
||||
lvm_size: 20
|
||||
|
||||
|
|
|
@ -17,8 +17,25 @@
|
|||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: get vm list
|
||||
virt: command=list_vms
|
||||
register: result
|
||||
always_run: yes
|
||||
|
||||
- name: generate libvirt xml files for clients
|
||||
template:
|
||||
src: client-libvirt.xml.j2
|
||||
dest: /root/{{ item }}.libvirt.xml
|
||||
dest: /root/{{ item.hostname }}.libvirt.xml
|
||||
when: item.hostname not in result.list_vms
|
||||
with_items: clients
|
||||
|
||||
- name: ensure the guest lvs are created
|
||||
lvol: lv={{ item.hostname }} vg={{ volgroup }} size={{ item.lvm_size }} state=present
|
||||
when: item.hostname not in result.list_vms
|
||||
with_items: clients
|
||||
|
||||
- name: ensure vms are defined
|
||||
virt: command=define xml=/root/{{ item.hostname }}.libvirt.xml
|
||||
when: item.hostname not in result.list_vms
|
||||
with_items: clients
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue