refactor(vars): add system/hypervisor dict inputs
This commit is contained in:
17
templates/xen.cfg.j2
Normal file
17
templates/xen.cfg.j2
Normal file
@@ -0,0 +1,17 @@
|
||||
builder = "hvm"
|
||||
name = "{{ hostname }}"
|
||||
memory = "{{ system_cfg.memory_mb }}"
|
||||
vcpus = "{{ system_cfg.cpus }}"
|
||||
disk = [
|
||||
{%- for disk in virtualization_xen_disks | default([]) -%}
|
||||
'file:{{ disk.path }},{{ disk.target }},w'{% if not loop.last or xen_installer_media_enabled | bool %}, {% endif %}
|
||||
{%- endfor -%}
|
||||
{%- if xen_installer_media_enabled | bool -%}
|
||||
'{{ boot_iso }},,hdc,cdrom'{% if rhel_iso is defined and rhel_iso | length > 0 %}, '{{ rhel_iso }},,hdd,cdrom'{% endif %}
|
||||
{%- endif -%}
|
||||
]
|
||||
vif = [ 'bridge={{ system_cfg.network }},model=e1000' ]
|
||||
boot = "{{ 'dc' if xen_installer_media_enabled | bool else 'c' }}"
|
||||
on_crash = "preserve"
|
||||
on_poweroff = "destroy"
|
||||
serial = "pty"
|
||||
Reference in New Issue
Block a user