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



__interfaces__:
  enp1s0:
    zones:
      lan:
        type: manual
      svc:
        type: manual
  enp2s0:
    zones:
      magenta:
        type: manual
  enp3s0:
    zones:
      mgmt:
        type: static
        address: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets[inventory_hostname]) | ipaddr('address') }}"
        netmask: "{{ network_zones.mgmt.prefix | ipaddr('netmask') }}"
      iot:
        type: manual


__interface_configs__: |
  {% for interface in __interfaces__.keys() %}
  ##
  ## /etc/network/interfaces.d/{{ interface }}
  ##
  auto {{ interface }}
  iface {{ interface }} inet manual

  {%   for zone in __interfaces__[interface].zones.keys() %}

  auto {{ interface }}.{{ network_zones[zone].vlan }}
  iface {{ interface }}.{{ network_zones[zone].vlan }} inet manual

  auto br-{{ zone }}
  iface br-{{ zone }} inet {{ __interfaces__[interface].zones[zone].type }}
    bridge_ports {{ interface }}.{{ network_zones[zone].vlan }}
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
  {%     if __interfaces__[interface].zones[zone].type == 'static' %}
    address {{ __interfaces__[interface].zones[zone].address }}
    netmask {{ __interfaces__[interface].zones[zone].netmask }}
  {%     endif %}

  {%   endfor %}
  {% endfor %}