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.jenkins-master
parent
2a5b257943
commit
1973378e75
|
@ -0,0 +1 @@
|
|||
radvd_interfaces: []
|
|
@ -0,0 +1,3 @@
|
|||
- name: restart radvd
|
||||
service: name=radvd
|
||||
state=restarted
|
|
@ -0,0 +1,23 @@
|
|||
- name: ensure radvd is installed
|
||||
package:
|
||||
name=radvd
|
||||
state=present
|
||||
tags:
|
||||
- install
|
||||
|
||||
- name: ensure radvd is configured
|
||||
template:
|
||||
src=radvd.conf.j2
|
||||
dest=/etc/radvd.conf
|
||||
mode=0644
|
||||
notify: restart radvd
|
||||
|
||||
- name: ensure radvd starts at boot
|
||||
service:
|
||||
name=radvd
|
||||
enabled=yes
|
||||
- meta: flush_handlers
|
||||
- name: ensure radvd is running
|
||||
service:
|
||||
name=radvd
|
||||
state=started
|
|
@ -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 %}"
|
|
@ -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 %}
|
Loading…
Reference in New Issue