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:
src: client-libvirt.xml.j2
dest: /root/{{ item }}.libvirt.xml
vmhostname: "{{ item['hostname'] }}"
vmmacaddress: "{{ item['macaddress'] }}"
vmdata: item
with_items: clients

View file

@ -1,5 +1,5 @@
<domain type='kvm'>
<name>{{ vmhostname }}</name>
<name>{{ vmdata['hostname'] }}</name>
<memory unit='KiB'>{{ mem_size_kb }}</memory>
<vcpu placement='static'>{{ num_cpus }}</vcpu>
<os>
@ -30,7 +30,7 @@
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='block' device='disk'>
<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'/>
<boot order='2'/>
<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'/>
</controller>
<interface type='bridge'>
<mac address='{{ vmmacaddress }}'/>
<mac address='{{ vmdata['macaddress'] }}'/>
<source bridge='{{ bridge_name }}'/>
<model type='virtio'/>
<boot order='1'/>