diff options
Diffstat (limited to 'roles/vmm/templates')
-rw-r--r-- | roles/vmm/templates/vm.conf.j2 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/roles/vmm/templates/vm.conf.j2 b/roles/vmm/templates/vm.conf.j2 new file mode 100644 index 0000000..88be7fb --- /dev/null +++ b/roles/vmm/templates/vm.conf.j2 @@ -0,0 +1,22 @@ +#jinja2: trim_blocks: True, lstrip_blocks: True + +{% for vm in vm.hosts %} +{% set vm = hostvars[vm] %} + +vm "{{ vm.ansible_host }}" { + {% if vm.enabled %} + enable + {% else %} + disable + {% endif %} + memory {{ vm.memory }} + disk "{{ vmm.disk.dir }}/{{ vm.ansible_host }}.{{ vmm.disk.format }}" + interface { + switch "{{ vmm.config.switch.name }}" + } +} +{% endfor %} + +switch "{{ vmm.config.switch.name }}" { + interface {{ vmm.config.switch.interface }} +} |