ansible/playbooks/ifupdown2.yml

411 lines
11 KiB
YAML
Raw Normal View History

2022-08-27 04:26:14 +02:00
#!/usr/bin/env ansible-playbook
---
- hosts:
2023-01-07 02:25:53 +01:00
- vm_network
2022-08-27 04:26:14 +02:00
vars:
2023-01-07 02:25:53 +01:00
ifupdown2__gateways:
adm:
- 2a09:6840:128::254
- 10.128.0.254
2022-08-27 04:26:14 +02:00
# TODO: netbox
ifupdown2__hosts:
2023-01-07 02:25:53 +01:00
edge-1.rtr.infra.auro.re:
ens18:
addresses:
- 2a09:6840:128::10:2/56
- 10.128.10.2/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
ipv6_addrgen: false
forward: true
ens20:
ipv6_addrgen: false
forward: true
ens21:
ipv6_addrgen: false
forward: true
ens22:
addresses:
- 2a09:6840:203:0:1::1/56
- 10.203.0.1/16
forward: true
edge-2.rtr.infra.auro.re:
2022-08-27 04:26:14 +02:00
ens18:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:128:10:102/56
- 10.128.10.102/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
ipv6_addrgen: false
forward: true
ens20:
ipv6_addrgen: false
forward: true
ens21:
ipv6_addrgen: false
forward: true
ens22:
addresses:
- 2a09:6840:203:0:2::1/56
- 10.203.0.2/16
forward: true
2022-08-27 10:21:04 +02:00
dns-1.int.infra.auro.re:
ens18:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:128::10:3/56
- 10.128.10.3/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:206:0:2::1/56
- 10.206.0.2/16
dns-2.int.infra.auro.re:
ens18:
addresses:
- 2a09:6840:128::10:103/56
- 10.128.10.103/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:206:0:3::1/56
- 10.206.0.3/16
ssh-1.mgmt.infra.auro.re:
ens18:
addresses:
- 2a09:6840:128::10:1/56
- 10.128.10.1/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
- 45.66.108.2/16
ssh-2.mgmt.infra.auro.re:
ens18:
addresses:
- 2a09:6840:128::10:101/56
- 10.128.10.101/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
- 45.66.108.3/16
infra-1.rtr.infra.auro.re:
ens18:
addresses:
- 2a09:6840:128::10:4/56
- 10.128.10.4/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:203:1:3::1/56
- 10.203.1.3/16
forward: true
ens20:
ipv6_addrgen: false
forward: true
ens21:
ipv6_addrgen: false
forward: true
ens22:
ipv6_addrgen: false
forward: true
ens23:
ipv6_addrgen: false
forward: true
ens1:
ipv6_addrgen: false
forward: true
ens2:
ipv6_addrgen: false
forward: true
enp1s3:
ipv6_addrgen: false
forward: true
infra-2.rtr.infra.auro.re:
ens18:
addresses:
- 2a09:6840:128::10:104/56
- 10.128.10.104/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:203:4::1/64
- 10.203.1.4/16
forward: true
ens20:
ipv6_addrgen: false
forward: true
ens21:
ipv6_addrgen: false
forward: true
ens22:
ipv6_addrgen: false
forward: true
ens23:
ipv6_addrgen: false
forward: true
ens1:
ipv6_addrgen: false
forward: true
ens2:
ipv6_addrgen: false
forward: true
enp1s3:
ipv6_addrgen: false
forward: true
isp-1.rtr.infra.auro.re:
2022-08-27 10:21:04 +02:00
ens18:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:128::10:5/56
- 10.128.10.5/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:203:0:5::1/56
- 10.203.0.5/16
forward: true
ens20:
ipv6_addrgen: false
2022-08-27 10:21:04 +02:00
clients:
bridge_vlan_aware: true
bridge_ports:
2023-01-07 02:25:53 +01:00
- ens20
2022-08-27 10:21:04 +02:00
bridge_vids:
- 1000-1004
2023-01-07 02:25:53 +01:00
bridge_disable_pvid: true
ipv6_addrgen: false
forward: true
2022-08-27 10:21:04 +02:00
client-0:
vlan_id: 1000
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
ipv6_addrgen: false
forward: true
2022-08-27 10:21:04 +02:00
client-1:
vlan_id: 1001
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
ipv6_addrgen: false
forward: true
2022-08-27 10:21:04 +02:00
client-2:
vlan_id: 1002
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
ipv6_addrgen: false
forward: true
2022-08-27 10:21:04 +02:00
client-3:
vlan_id: 1003
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
ipv6_addrgen: false
forward: true
2022-08-27 10:21:04 +02:00
client-4:
vlan_id: 1004
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
ipv6_addrgen: false
forward: true
isp-2.rtr.infra.auro.re:
2022-08-27 10:21:04 +02:00
ens18:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:128::10:105/56
- 10.128.10.105/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:203:0:5::1/56
- 10.203.0.5/16
forward: true
ens20:
ipv6_addrgen: false
2022-08-27 10:21:04 +02:00
clients:
bridge_vlan_aware: true
bridge_ports:
2023-01-07 02:25:53 +01:00
- ens20
2022-08-27 10:21:04 +02:00
bridge_vids:
- 1000-1004
2023-01-07 02:25:53 +01:00
forward: true
2022-08-27 10:21:04 +02:00
client-0:
vlan_id: 1000
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
ipv6_addrgen: false
forward: true
2022-08-27 10:21:04 +02:00
client-1:
vlan_id: 1001
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
ipv6_addrgen: false
forward: true
2022-08-27 10:21:04 +02:00
client-2:
vlan_id: 1002
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
ipv6_addrgen: false
forward: true
2022-08-27 10:21:04 +02:00
client-3:
vlan_id: 1003
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
ipv6_addrgen: false
forward: true
2022-08-27 10:21:04 +02:00
client-4:
vlan_id: 1004
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
ipv6_addrgen: false
forward: true
dhcp-1.isp.infra.auro.re:
2022-08-27 10:21:04 +02:00
ens18:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:128::10:6/56
- 10.128.10.6/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:210:1:1::1/56
- 10.210.1.1/16
ens20: null
2022-08-27 10:21:04 +02:00
clients:
bridge_vlan_aware: true
bridge_ports:
2023-01-07 02:25:53 +01:00
- ens20
2022-08-27 10:21:04 +02:00
bridge_vids:
- 1000-1004
client-0:
2023-01-07 02:25:53 +01:00
addresses:
- 100.64.0.2/27
2022-08-27 10:21:04 +02:00
vlan_id: 1000
vlan_raw_device: clients
client-1:
2023-01-07 02:25:53 +01:00
addresses:
- 100.64.0.34/27
2022-08-27 10:21:04 +02:00
vlan_id: 1001
vlan_raw_device: clients
client-2:
2023-01-07 02:25:53 +01:00
addresses:
- 100.64.0.66/27
2022-08-27 10:21:04 +02:00
vlan_id: 1002
vlan_raw_device: clients
client-3:
2023-01-07 02:25:53 +01:00
addresses:
- 100.64.0.98/27
2022-08-27 10:21:04 +02:00
vlan_id: 1003
vlan_raw_device: clients
client-4:
2023-01-07 02:25:53 +01:00
addresses:
- 100.64.0.130/27
2022-08-27 10:21:04 +02:00
vlan_id: 1004
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
dhcp-2.isp.infra.auro.re:
2022-08-27 10:21:04 +02:00
ens18:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:128::10:106/56
- 10.128.10.106/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:210:1:2::1/56
- 10.210.1.2/16
ens20: null
2022-08-27 10:21:04 +02:00
clients:
bridge_vlan_aware: true
bridge_ports:
2023-01-07 02:25:53 +01:00
- ens20
2022-08-27 10:21:04 +02:00
bridge_vids:
- 1000-1004
client-0:
2023-01-07 02:25:53 +01:00
addresses:
- 100.64.0.3/27
2022-08-27 10:21:04 +02:00
vlan_id: 1000
vlan_raw_device: clients
client-1:
2023-01-07 02:25:53 +01:00
addresses:
- 100.64.0.35/27
2022-08-27 10:21:04 +02:00
vlan_id: 1001
vlan_raw_device: clients
client-2:
2023-01-07 02:25:53 +01:00
addresses:
- 100.64.0.67/27
2022-08-27 10:21:04 +02:00
vlan_id: 1002
vlan_raw_device: clients
client-3:
2023-01-07 02:25:53 +01:00
addresses:
- 100.64.0.99/27
2022-08-27 10:21:04 +02:00
vlan_id: 1003
vlan_raw_device: clients
client-4:
2023-01-07 02:25:53 +01:00
addresses:
- 100.64.0.131/27
2022-08-27 10:21:04 +02:00
vlan_id: 1004
vlan_raw_device: clients
2023-01-07 02:25:53 +01:00
radius-1.isp.infra.auro.re:
ens18:
2023-01-07 02:25:53 +01:00
addresses:
- 2a09:6840:128::10:7/56
- 10.128.10.7/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:210:1:1::1/56
- 10.210.1.1/16
radius-2.isp.infra.auro.re:
ens18:
2023-01-07 02:25:53 +01:00
addresses:
- 2a09:6840:128::10:107/56
- 10.128.10.107/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:210:1:2::1/56
ldap-1.int.infra.auro.re:
2022-12-22 15:45:07 +01:00
ens18:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:128::10:8/56
- 10.128.10.8/16
gateways: "{{ ifupdown2__gateways.adm }}"
2022-12-22 15:45:07 +01:00
ens19:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:206:1:3::1/56
- 10.206.1.3/16
ldap-2.int.infra.auro.re:
2022-12-22 15:45:07 +01:00
ens18:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:128::10:108/56
- 10.128.10.108/16
gateways: "{{ ifupdown2__gateways.adm }}"
2022-12-22 15:45:07 +01:00
ens19:
addresses:
2023-01-07 02:25:53 +01:00
- 2a09:6840:206:1:4::1/56
- 10.206.1.4/16
ntp-1.int.infra.auro.re:
ens18:
addresses:
- 2a09:6840:128::10:9/56
- 10.128.10.9/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:206:1:5::1/56
- 10.206.1.5/16
ntp-2.int.infra.auro.re:
ens18:
addresses:
- 2a09:6840:128::10:109/56
- 10.128.10.109/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:206:1:6::1/56
- 10.206.1.6/16
prometheus-1.monit.infra.auro.re:
ens18:
addresses:
- 2a09:6840:128::10:10/56
- 10.128.10.10/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:204:1:1::1/56
- 10.204.1.1/16
prometheus-2.monit.infra.auro.re:
ens18:
addresses:
- 2a09:6840:128::10:110/56
- 10.128.10.110/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
addresses:
- 2a09:6840:204:1:2::1/56
- 10.204.1.2/16
2022-08-27 04:26:14 +02:00
ifupdown2__interfaces: "{{ ifupdown2__hosts[inventory_hostname] }}"
roles:
- ifupdown2
...