summaryrefslogtreecommitdiff
path: root/inventory/host_vars/ch-gnocchi.yml
blob: 35527e2d5c6389f4d202717f2497cc058e534a2b (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
---
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


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() %}
  {%   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() %}


  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/*