radvd: Install and configure radvd

The *radvd* role and `radvd.yml` playbook can be used to configure the
`radvd` IPv6 SLAAC router advertisement daemon on Linux.
This commit is contained in:
2018-03-13 23:22:37 -05:00
parent 2a5b257943
commit 1973378e75
6 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/radvd/files/radvd.conf,v 1.1 2006/07/19 13:02:36 uberlord Exp $
# Extra options to pass to radvd
OPTIONS=""
# Set this to "no" to tell the init script NOT to set up IPv6 forwarding
# using /proc/sys/net/ipv6/conf/all/forwarding
# Only change this if you know what you're doing!
FORWARD="yes"
rc_need="!net {% for i in radvd_interfaces %}net.{{ i.interface }}{% if not loop.last %} {% endif %}{% endfor %}"

View File

@@ -0,0 +1,28 @@
{% for iface in radvd_interfaces %}
interface {{ iface.interface }}
{
AdvSendAdvert on;
{% if iface.other_config|d(False) %}
AdvOtherConfigFlag on;
{% endif %}
prefix {{ iface.prefix }} {
AdvOnLink {% if iface.on_link|d(True) %}on{% else %}off{% endif %};
AdvAutonomous {% if iface.autonomous|d(True) %}on{% else %}off{% endif %};
};
{% if iface.rdnss is defined %}
{% for address in iface.rdnss %}
RDNSS {{ address }} {
};
{% endfor %}
{% endif %}
{% if iface.dnssl is defined %}
{% for domain in iface.dnssl %}
DNSSL {{ domain }} {
};
{% endfor %}
{% endif %}
};
{% endfor %}