WIP: Infrastructure routers #91
1 changed files with 105 additions and 0 deletions
105
playbooks/router.yml
Executable file
105
playbooks/router.yml
Executable file
|
@ -0,0 +1,105 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts:
|
||||
- infra-1.router.auro.re
|
||||
- infra-2.router.auro.re
|
||||
vars:
|
||||
networkd_interfaces:
|
||||
vlan111:
|
||||
mac_addr: "{{ network.vlan111.mac_addr }}"
|
||||
link_local: false
|
||||
vlan128:
|
||||
mac_addr: "{{ network.vlan128.mac_addr }}"
|
||||
link_local: false
|
||||
vlan129:
|
||||
mac_addr: "{{ network.vlan129.mac_addr }}"
|
||||
ip_addrs: "{{ network.vlan129.ipv4_addrs
|
||||
+ network.vlan129.ipv6_addrs }}"
|
||||
vlan130:
|
||||
mac_addr: "{{ network.vlan130.mac_addr }}"
|
||||
link_local: false
|
||||
vlan131:
|
||||
mac_addr: "{{ network.vlan131.mac_addr }}"
|
||||
link_local: false
|
||||
vlan133:
|
||||
mac_addr: "{{ network.vlan133.mac_addr }}"
|
||||
link_local: false
|
||||
vlan134:
|
||||
mac_addr: "{{ network.vlan134.mac_addr }}"
|
||||
link_local: false
|
||||
vlan135:
|
||||
mac_addr: "{{ network.vlan135.mac_addr }}"
|
||||
ip_addrs: "{{ network.vlan135.ipv4_addrs
|
||||
+ network.vlan135.ipv6_addrs }}"
|
||||
roles:
|
||||
- systemd_networkd
|
||||
|
||||
- hosts:
|
||||
- infra-1.router.auro.re
|
||||
- infra-2.router.auro.re
|
||||
vars:
|
||||
bird_router_id: "{{ network.vlan129.ipv4_addrs[0] | ipaddr('address') }}"
|
||||
bird_ospf_src: "{{ network.vlan135.ipv4_addrs[0] | ipaddr('address') }}"
|
||||
bird_ospf_src_v6: "{{ network.vlan135.ipv6_addrs[0] | ipaddr('address') }}"
|
||||
bird_ospf_interfaces:
|
||||
vlan111:
|
||||
stub: true
|
||||
vlan128:
|
||||
stub: true
|
||||
vlan129:
|
||||
broadcast: true
|
||||
vlan130:
|
||||
stub: true
|
||||
vlan131:
|
||||
stub: true
|
||||
vlan133:
|
||||
stub: true
|
||||
vlan134:
|
||||
stub: true
|
||||
roles:
|
||||
- bird
|
||||
|
||||
- hosts:
|
||||
- infra-1.router.auro.re
|
||||
- infra-2.router.auro.re
|
||||
vars:
|
||||
keepalived_notify_master: "/usr/local/sbin/conntrackd_vrrp primary"
|
||||
keepalived_notify_backup: "/usr/local/sbin/conntrackd_vrrp backup"
|
||||
keepalived_notify_fault: "/usr/local/sbin/conntrackd_vrrp fault"
|
||||
keepalived_virtual_router_id: 42
|
||||
keepalived_interface: vlan129
|
||||
keepalived_virtual_addresses_v4:
|
||||
vlan111:
|
||||
- 45.66.111.10/24 # 45.66.111.1/24
|
||||
vlan128:
|
||||
- 10.128.0.16/16 # 10.128.0.1/16
|
||||
vlan130:
|
||||
- 10.130.0.185/16 # 10.130.0.1/16
|
||||
vlan131:
|
||||
- 10.131.0.1/16
|
||||
vlan133:
|
||||
- 10.133.0.1/16
|
||||
vlan134:
|
||||
- 10.134.0.1/16
|
||||
keepalived_virtual_addresses_v6:
|
||||
vlan111:
|
||||
- fe80::200:02ff:fe23:ae26/64
|
||||
- 2a09:6840:111:0:10::/56 # 2a09:6840:111:0:1::/56
|
||||
vlan128:
|
||||
- fe80::200:02ff:fe9f:d67a/64
|
||||
- 2a09:6840:128:0:16::/48 # 2a09:6840:128:0:1::/48
|
||||
vlan130:
|
||||
- fe80::200:02ff:fee2:9782/64
|
||||
- 2a09:6840:130:0:185::/48 # 2a09:6840:130:0:1::/48
|
||||
vlan131:
|
||||
- fe80::200:02ff:fee2:9782/64
|
||||
- 2a09:6840:131:0:1::/48
|
||||
vlan133:
|
||||
- fe80::200:02ff:fe8a:0cbc/64
|
||||
- 2a09:6840:133:0:1::/48
|
||||
vlan134:
|
||||
- fe80::200:02ff:fe09:38f7/64
|
||||
- 2a09:6840:134:0:1::/48
|
||||
roles:
|
||||
- keepalived
|
||||
...
|
Loading…
Reference in a new issue