Commit 8cb17135 authored by Rafael Monnerat's avatar Rafael Monnerat

playbook: Add roles/radvd to configure radvd

parent 4c83d562
---
- name: restart re6stnet
service: name=re6stnet state=restarted
...@@ -2,8 +2,29 @@ ...@@ -2,8 +2,29 @@
hosts: 127.0.0.1 hosts: 127.0.0.1
connection: local connection: local
vars_prompt:
- name: "network_prefix"
prompt: "RADVD Adv. Network"
private: no
roles: roles:
- { role: package, package_name: radvd, package_state: present } - { role: radvd }
- { role: package, package_name: dnsmasq, package_state: present } - { role: package, package_name: dnsmasq, package_state: present }
tasks:
- name: Check if configuration exists already
stat: path=/etc/re6stnet/re6stnet.conf
register: re6stnet_conf
- lineinfile: dest=/etc/re6stnet/re6stnet.conf line='interface eth0' state=present
notify: restart re6stnet
when: re6stnet_conf.stat.exists == True
- lineinfile: dest=/etc/re6stnet/re6stnet.conf line='main-interface eth0' state=present
notify: restart re6stnet
when: re6stnet_conf.stat.exists == True
- lineinfile: dest=/etc/re6stnet/re6stnet.conf line='daemon "/usr/sbin/radvd -n /etc/radvd.conf"' state=present
notify: restart re6stnet
when: re6stnet_conf.stat.exists == True
---
- name: restart re6stnet
service: name=re6stnet state=restarted
---
dependencies:
- { role: package, package_name: radvd, package_state: present }
- name: copy templates
template: src=radvd.conf.in dest=/etc/radvd.conf mode=660
interface eth0
{
AdvSendAdvert on;
prefix {{ network_prefix}}c000/64
{
};
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment