add radvd role, deploy in routers
This commit is contained in:
parent
a32116131d
commit
a4841e6947
4 changed files with 92 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
||||||
- hosts: ~routeur-(pacaterie|edc|fleming|gs).*\.adm\.auro\.re
|
- hosts: ~routeur-(pacaterie|edc|fleming|gs).*\.adm\.auro\.re
|
||||||
roles:
|
roles:
|
||||||
- router
|
- router
|
||||||
|
- radvd
|
||||||
|
|
||||||
|
|
||||||
# Radius (backup only for now)
|
# Radius (backup only for now)
|
||||||
|
|
4
roles/radvd/handlers/main.yml
Normal file
4
roles/radvd/handlers/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
- name: restart radvd
|
||||||
|
systemd:
|
||||||
|
state: restarted
|
||||||
|
name: radvd
|
20
roles/radvd/tasks/main.yml
Normal file
20
roles/radvd/tasks/main.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
# Warning: radvd installation seems to fail if the configuration
|
||||||
|
# file doesn't already exist when the package is installed,
|
||||||
|
# so the order is important.
|
||||||
|
- name: Configure radvd
|
||||||
|
template:
|
||||||
|
src: radvd.conf.j2
|
||||||
|
dest: /etc/radvd.conf
|
||||||
|
mode: 0644
|
||||||
|
notify: restart radvd
|
||||||
|
|
||||||
|
- name: Install radvd
|
||||||
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
name: radvd
|
||||||
|
state: present
|
||||||
|
notify: restart radvd
|
||||||
|
|
67
roles/radvd/templates/radvd.conf.j2
Normal file
67
roles/radvd/templates/radvd.conf.j2
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
# -*- mode: conf-unix; coding: utf-8 -*-
|
||||||
|
|
||||||
|
##
|
||||||
|
# Bornes Wi-Fi
|
||||||
|
##
|
||||||
|
|
||||||
|
interface ens19 { # XXX - FIX THE INTERFACE NAME
|
||||||
|
AdvSendAdvert on;
|
||||||
|
AdvLinkMTU {{ mtu }};
|
||||||
|
AdvDefaultPreference high;
|
||||||
|
MaxRtrAdvInterval 30;
|
||||||
|
|
||||||
|
|
||||||
|
prefix 2a09:6840:{{ subnet_ids.ap }}::/64 {
|
||||||
|
AdvRouterAddr on;
|
||||||
|
};
|
||||||
|
|
||||||
|
# La zone DNS
|
||||||
|
DNSSL borne.auro.re {};
|
||||||
|
|
||||||
|
# Les DNS récursifs
|
||||||
|
RDNSS 2a09:6840:{{ subnet_ids.ap }}::{{ dns_host_suffix_main }} {};
|
||||||
|
RDNSS 2a09:6840:{{ subnet_ids.ap }}::{{ dns_host_suffix_backup }} {};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
# Utilisateurs filaire
|
||||||
|
##
|
||||||
|
interface ens20 { # XXX
|
||||||
|
AdvSendAdvert on;
|
||||||
|
AdvLinkMTU {{ mtu }};
|
||||||
|
AdvDefaultPreference high;
|
||||||
|
MaxRtrAdvInterval 30;
|
||||||
|
|
||||||
|
prefix 2a09:6840:{{ subnet_ids.users_wired }}::/64 {
|
||||||
|
AdvRouterAddr on;
|
||||||
|
};
|
||||||
|
|
||||||
|
DNSSL fil.{{ apartment_block_dhcp }}.auro.re {}; # TODO: fix this shitty workaround.
|
||||||
|
|
||||||
|
RDNSS 2a09:6840:{{ subnet_ids.users_wired }}::{{ dns_host_suffix_main }} {};
|
||||||
|
RDNSS 2a09:6840:{{ subnet_ids.users_wired }}::{{ dns_host_suffix_backup }} {};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
# Utilisateurs wifi
|
||||||
|
##
|
||||||
|
interface ens20 { # XXX: interface name
|
||||||
|
AdvSendAdvert on;
|
||||||
|
AdvLinkMTU {{ mtu }};
|
||||||
|
AdvDefaultPreference high;
|
||||||
|
MaxRtrAdvInterval 30;
|
||||||
|
|
||||||
|
prefix 2a09:6840:{{ subnet_ids.users_wifi }}::/64 {
|
||||||
|
AdvRouterAddr on;
|
||||||
|
};
|
||||||
|
|
||||||
|
DNSSL wifi.{{ apartment_block_dhcp }}.auro.re {}; # TODO: fix this shitty workaround.
|
||||||
|
|
||||||
|
RDNSS 2a09:6840:{{ subnet_ids.users_wifi }}::{{ dns_host_suffix_main }} {};
|
||||||
|
RDNSS 2a09:6840:{{ subnet_ids.users_wifi }}::{{ dns_host_suffix_backup }} {};
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in a new issue