diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-01-03 22:42:20 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-01-03 22:42:20 +0100 |
commit | 9a8c06e53273fb6fb35c16aeb2429320b421f6a8 (patch) | |
tree | ec53d8788a917171f973e08fe02cbde5c619b0d0 /inventory/host_vars | |
parent | add new openwrt-based testvm (diff) |
first basic version of openwrt-based vms
Diffstat (limited to 'inventory/host_vars')
-rw-r--r-- | inventory/host_vars/ch-testvm-openwrt.yml | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/inventory/host_vars/ch-testvm-openwrt.yml b/inventory/host_vars/ch-testvm-openwrt.yml index f14bd548..5a208b55 100644 --- a/inventory/host_vars/ch-testvm-openwrt.yml +++ b/inventory/host_vars/ch-testvm-openwrt.yml @@ -8,9 +8,8 @@ install: primary: /dev/sda scsi: sda: - type: zfs - name: root - size: 15g + type: image + path: /srv/nvme/ch-testvm-openwrt.img interfaces: - bridge: br-svc name: svc0 @@ -98,20 +97,12 @@ openwrt_uci: proto: static ipaddr: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address') }}" netmask: "{{ network_zones.svc.prefix | ipaddr('netmask') }}" + gateway: "{{ network_zones.svc.gateway }}" + dns: "{{ network_zones.svc.dns }}" - -virsh_domxml: | - <domain type='kvm'> - <os> - <kernel>/srv/ch-router/vmlinuz</kernel> - <cmdline>console=ttyS0,115200n8 noinitrd root=/dev/vda</cmdline> - <boot dev='hd'/> - </os> - <devices> - <disk type='file' device='disk'> - <driver name='qemu' type='raw' cache='none'/> - <source file='/srv/ch-router/rootfs-ext4.img'/> - <target dev='sda' bus='virtio'/> - </disk> - </devices> - </domain> + - name: route 'lan' + options: + interface: svc + target: "{{ network_zones.lan.prefix | ipaddr('network') }}" + netmask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}" + gateway: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ipaddr('address') }}" |