still struggling with evaluation time, trying something different

This commit is contained in:
Tim Flink 2015-05-06 20:53:06 +00:00
parent e6a6b4cd30
commit 04aa3ef776
2 changed files with 4 additions and 5 deletions

View file

@ -21,6 +21,5 @@
template: template:
src: client-libvirt.xml.j2 src: client-libvirt.xml.j2
dest: /root/{{ item }}.libvirt.xml dest: /root/{{ item }}.libvirt.xml
vmhostname: "{{ item['hostname'] }}" vmdata: item
vmmacaddress: "{{ item['macaddress'] }}"
with_items: clients with_items: clients

View file

@ -1,5 +1,5 @@
<domain type='kvm'> <domain type='kvm'>
<name>{{ vmhostname }}</name> <name>{{ vmdata['hostname'] }}</name>
<memory unit='KiB'>{{ mem_size_kb }}</memory> <memory unit='KiB'>{{ mem_size_kb }}</memory>
<vcpu placement='static'>{{ num_cpus }}</vcpu> <vcpu placement='static'>{{ num_cpus }}</vcpu>
<os> <os>
@ -30,7 +30,7 @@
<emulator>/usr/bin/qemu-kvm</emulator> <emulator>/usr/bin/qemu-kvm</emulator>
<disk type='block' device='disk'> <disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/> <driver name='qemu' type='raw' cache='none' io='native'/>
<source dev='/dev/{{ volgroup }}/{{ vmhostname }}'/> <source dev='/dev/{{ volgroup }}/{{ vmdata['hostname'] }}'/>
<target dev='vda' bus='virtio'/> <target dev='vda' bus='virtio'/>
<boot order='2'/> <boot order='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
@ -55,7 +55,7 @@
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</controller> </controller>
<interface type='bridge'> <interface type='bridge'>
<mac address='{{ vmmacaddress }}'/> <mac address='{{ vmdata['macaddress'] }}'/>
<source bridge='{{ bridge_name }}'/> <source bridge='{{ bridge_name }}'/>
<model type='virtio'/> <model type='virtio'/>
<boot order='1'/> <boot order='1'/>