summaryrefslogtreecommitdiff
path: root/inventory/host_vars/ele-mur.yml
blob: 6a744865e979ed617ff8266ff20d0ee76f7f09d9 (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
---
ssh_users_root:
  - equinox
  - datacop

install:
  vm:
    memory: 1G
    numcpus: 1
    autostart: False
  disks:
    primary: /dev/sda
    scsi:
      sda:
        type: zfs
        name: root
        size: 5g
  interfaces:
  - bridge: br-public
    name: primary0
    mac: 52:54:00:37:fd:8a
  - bridge: br-funkfeuer
    name: funkfeuer0
    mac: 52:54:00:37:fd:8b

network:
  nameservers: "{{ vm_host.network.dns }}"
  domain: "{{ host_domain }}"
  systemd_link:
    interfaces: "{{ install.interfaces }}"
  primary: &_network_primary_
    name: primary0
    address: "{{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) }}"
    gateway: "{{ vm_host.network.bridges.public.gateway }}"
    address6: "{{ vm_host.network.bridges.public.prefix6 | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets6[inventory_hostname]) }}"
    gateway6: "{{ vm_host.network.bridges.public.gateway6 }}"
  interfaces:
  - *_network_primary_
  - name: funkfeuer0
    content: |
      address {{ network_zones.murat_transfer.prefix | ansible.utils.ipaddr(network_zones.murat_transfer.offsets[inventory_hostname]) }}
      up iptables -t nat -A POSTROUTING -s {{ network_zones.murat_transfer.prefix }} -o primary0 -j SNAT --to {{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}
      up sysctl net.ipv4.ip_forward=1
      down iptables -t nat -D POSTROUTING -s {{ network_zones.murat_transfer.prefix }} -o primary0 -j SNAT --to {{ vm_host.network.bridges.public.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}