Skip to content

Instantly share code, notes, and snippets.

@platu
Last active March 20, 2024 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save platu/1312cb965502325f08bc5581f032192f to your computer and use it in GitHub Desktop.
Save platu/1312cb965502325f08bc5581f032192f to your computer and use it in GitHub Desktop.
IaC Lab host_vars
---
lab_name: iac_lab01
cloud_url: cloud.debian.org/images/cloud/trixie/daily/latest/debian-13-genericcloud-amd64-daily.qcow2
image_name: debian-13-amd64.qcow2
filesystem_resize: 32G
oob_vlan: 28
taps:
- name: tapXXX
vlan_mode: trunk
trunks: [0, 28, 230]
link: vmXXX
switch: dsw-host
- name: tapYYY
vlan_mode: trunk
trunks: [0, 28, 230]
link: vmYYY
switch: dsw-host
---
ram: 1024
inband_vlan: 230
patches:
enp0s1: tapXXX
tap_number: "{{ patches.enp0s1 | regex_replace('tap', '') }}"
interfaces:
- interface_type: vlan
interface_id: "{{ inband_vlan }}"
ipv4_address: 10.0.{{ 228 + tap_number|int // 256 }}.{{ tap_number|int % 256 }}/22
ipv4_gateway: 10.0.228.1
ipv4_dns: 172.16.0.2
---
ram: 1024
inband_vlan: 230
patches:
enp0s1: tapYYY
tap_number: "{{ patches.enp0s1 | regex_replace('tap', '') }}"
interfaces:
- interface_type: vlan
interface_id: "{{ inband_vlan }}"
ipv4_address: 10.0.{{ 228 + tap_number|int // 256 }}.{{ tap_number|int % 256 }}/22
ipv4_gateway: 10.0.228.1
ipv4_dns: 172.16.0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment