From 333eff6a0aeefcbf573bbf5e725fc27b5b4cb9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Mon, 6 Dec 2021 20:10:25 +0000 Subject: roles/vmm: Setup and create vms on openbsd --- roles/vmm/templates/vm.conf.j2 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 roles/vmm/templates/vm.conf.j2 (limited to 'roles/vmm/templates/vm.conf.j2') diff --git a/roles/vmm/templates/vm.conf.j2 b/roles/vmm/templates/vm.conf.j2 new file mode 100644 index 0000000..d45c398 --- /dev/null +++ b/roles/vmm/templates/vm.conf.j2 @@ -0,0 +1,22 @@ +# managed by Ansible + +# network +switch "{{ vmm_network_switch.name }}" { + interface {{ vmm_network_switch.interface }} +} + +# virtual machines +{% for vm in __vms %} +vm "{{ vm.name }}" { +{% if vm.enabled is defined and not vm.enabled %} + disable +{% endif %} + memory {{ vm.memory }} + disk "{{ vmm_disk_dir }}/{{ vm.name }}.{{ vmm_disk_format }}" + interface { + switch "{{ vmm_network_switch.name }}" + lladdr {{ vm.lladdr }} + } +} + +{% endfor %} -- cgit v1.2.3