aboutsummaryrefslogtreecommitdiffstats
path: root/roles/vmm/templates/vm.conf.j2
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-06 20:10:25 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-07 20:24:51 +0000
commit333eff6a0aeefcbf573bbf5e725fc27b5b4cb9f6 (patch)
tree1f06800c26e23bb272af02d45fe4d73f4f2a091e /roles/vmm/templates/vm.conf.j2
parent4e542a8e15596421a9120cf700f0d4d12dbf6688 (diff)
downloadrules-333eff6a0aeefcbf573bbf5e725fc27b5b4cb9f6.tar.gz
roles/vmm: Setup and create vms on openbsd
Diffstat (limited to 'roles/vmm/templates/vm.conf.j2')
-rw-r--r--roles/vmm/templates/vm.conf.j222
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..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 %}
remember that computers suck.