blob: a6452c126c444d13f9dbb6dd5d7b5d1d6a26d3ad (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
---
install_interface: enp2s0
install_dhcp: true
install:
disks:
primary: /dev/disk/by-id/ata-Samsung_SSD_860_EVO_mSATA_250GB_S41MNC0KA13977X
kernel_cmdline:
- console=ttyS0,115200n8
network:
domain: spreadspace.org
apt_repo_components:
- main
- contrib
- non-free ## for microcode updates
installer_lvm:
vg: "{{ host_name }}"
lv: installer
size: 10G
fs: ext4
__interface_zones__:
enp1s0:
- lan
- svc
enp2s0:
- magenta
enp3s0:
- name: mgmt
prefix: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets[inventory_hostname]) }}"
- iot
__interface_zones_yaml__: |
{% for interface in (__interface_zones__.keys() | sort) %}
{% for zone in __interface_zones__[interface] %}
{% if zone is mapping %}
{{ zone.name }}:
interfaces:
- {{ interface }}.{{ network_zones[zone.name].vlan }}
prefix: {{ zone.prefix }}
{% else %}
{{ zone }}:
interfaces:
- {{ interface }}.{{ network_zones[zone].vlan }}
{% endif %}
{% endfor %}
{% endfor %}
vm_host:
network:
bridges: "{{ __interface_zones_yaml__ | from_yaml }}"
__interface_configs__: |
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
{% for interface in (__interface_zones__.keys() | sort) %}
auto {{ interface }}
iface {{ interface }} inet manual
{% for zone in __interface_zones__[interface] %}
{% if zone is mapping %}
auto {{ interface }}.{{ network_zones[zone.name].vlan }}
iface {{ interface }}.{{ network_zones[zone.name].vlan }} inet manual
{% else %}
auto {{ interface }}.{{ network_zones[zone].vlan }}
iface {{ interface }}.{{ network_zones[zone].vlan }} inet manual
{% endif %}
{% endfor %}
{% endfor %}
source /etc/network/interfaces.d/*
|