forked from FreifunkBremen/ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hosts
executable file
·72 lines (57 loc) · 2.43 KB
/
hosts
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
#! /usr/bin/env python3
from sys import path
path.append("lib")
import hosts
inv = hosts.Inventory('site/site.conf',
ipv6_global_network = "2a06:8782:ffbb:1337::/64",
ipv6_uplink_network = "2a06:8782:ffbb::/64",
icvpn_ipv4_network = "10.207.0.196/16",
icvpn_ipv6_network = "fec0::a:cf:0:c4/96",
)
grp = inv.group("vpnservers",
dhcp=True,
icvpn=True,
batman_gateway=True,
firewall_enabled=True,
)
grp.host(1, "vpn01.bremen.freifunk.net", exit_ipv4="default", exit_ipv4_interface="eth0", exit_ipv6_remote=False, exit_ipv6_interface="eth0", max_mtu=1462)
grp.host(2, "vpn02.bremen.freifunk.net", exit_ipv4="default", exit_ipv4_interface="eth0", exit_ipv6_remote=False, exit_ipv6_interface="eth0", max_mtu=1438)
grp.host(3, "vpn03.bremen.freifunk.net", exit_ipv4="default", exit_ipv4_interface="eth0", exit_ipv6_remote=False, exit_ipv6_interface="eth0", max_mtu=1462)
grp.host(5, "vpn05.bremen.freifunk.net", exit_ipv4="default", exit_ipv4_interface="ens3", exit_ipv6_remote=False, exit_ipv6_interface="ens3", max_mtu=1438)
grp.host(6, "vpn06.bremen.freifunk.net", exit_ipv4="default", exit_ipv4_interface="eth0", max_mtu=1462)
grp = inv.group("eventsserver")
grp.host(0, "mgmt.bremen.freifunk.net")
grp = inv.group("webserver")
grp.host(0, "webserver.bremen.freifunk.net")
grp = inv.group("downlinks", batman_gateway=True, firewall_enabled=True)
grp.host(12, "ipv6-downlink.bremen.freifunk.net", max_mtu=1462)
grp = inv.group("dnsserver");
grp.host(0, "dns.bremen.freifunk.net");
grp = inv.group("vmhosts")
grp.host(0, "bre-1.bremen.freifunk.net")
grp.host(0, "bre-2.bremen.freifunk.net")
grp = inv.group("ffmapserver")
grp.host(0, "ffmap.bremen.freifunk.net")
grp = inv.group("etherpad")
grp.host(0, "pads.bremen.freifunk.net")
grp = inv.group("monitoring")
grp.host(0, "monitoring.bremen.freifunk.net")
# vpnservers und downlinks zu backbone zusammenfassen
grp = inv.group("backbone")
grp.child("vpnservers")
grp.child("downlinks")
# alle Root-Server mit Standard-Config
grp = inv.group("standardserver")
grp.host(0, "bgp-plutex01.bremen.freifunk.net")
grp.host(0, "mail.bremen.freifunk.net")
grp.host(0, "syslog.bremen.freifunk.net")
grp.host(0, "jenkins.bremen.freifunk.net")
grp.host(0, "code.bremen.freifunk.net")
grp.host(0, "vpn04.bremen.freifunk.net")
grp.host(0, "babel-gw-lwlcom.bremen.freifunk.net")
grp.child("vmhosts")
grp.child("backbone")
grp.child("webserver")
grp.child("dnsserver")
grp.child("ffmapserver")
print(inv.json_dump(indent=4))