Make vars more readable and fix one lint error
This commit is contained in:
parent
d54fe7975c
commit
6798c71285
1 changed files with 9 additions and 4 deletions
|
@ -4,16 +4,21 @@
|
|||
gather_facts: false
|
||||
|
||||
vars:
|
||||
letters: "{{ 'bcdefghijklmnopqrstuvwxyz'|list }}"
|
||||
console_log: "/var/log/libvirt/qemu/{{ inventory_hostname }}.console.log"
|
||||
vmhost_uri: "qemu+ssh://root@{{ vmhost }}/system"
|
||||
root_pubkey: "{{ lookup('file', '/srv/ansible-private/ssh/id_rsa.pub') }}"
|
||||
|
||||
letters: "{{ 'bcdefghijklmnopqrstuvwxyz'|list }}"
|
||||
console_log: "/var/log/libvirt/qemu/{{ inventory_hostname }}.console.log"
|
||||
os_disk_image: "/srv/libvirt/ssd/{{ inventory_hostname }}.a.img"
|
||||
disk_opts: bus=virtio,cache=none,device=disk,format=raw
|
||||
|
||||
extra_disks: >-
|
||||
{% if datadisk_size is defined %}
|
||||
{% for num in range(datadisk_size|count) %}
|
||||
--disk /srv/libvirt/hdd/{{ inventory_hostname }}.{{ letters[num] }}.img,cache=none,format=raw,bus=virtio,size={{ datadisk_size[num] }}
|
||||
--disk /srv/libvirt/hdd/{{ inventory_hostname }}.{{ letters[num] }}.img,{{ disk_opts }},size={{ datadisk_size[num] }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
virt_install_network: >-
|
||||
{% for item in interfaces %}
|
||||
{% if item[1] is defined %}
|
||||
|
@ -62,7 +67,7 @@
|
|||
--controller usb,model=none --sound none \
|
||||
--vcpus "sockets=1,cores={{ num_cpus }},threads=1,placement=auto" \
|
||||
--memory {{ mem_size }} --cpu host-passthrough \
|
||||
--disk /srv/libvirt/ssd/{{ inventory_hostname }}.a.img,cache=none,format=raw,bus=virtio,size={{ dsk_size }} \
|
||||
--disk {{ os_disk_image }},{{ disk-opts }},size={{ dsk_size }} \
|
||||
{{ extra_disks }} --initrd-inject {{ tmpdir.path }}/include.ks \
|
||||
{{ virt_install_network }} \
|
||||
{{ virt_install_os_args }}
|
||||
|
|
Loading…
Add table
Reference in a new issue