2017-09-05 12:01:27 +02:00
|
|
|
---
|
|
|
|
- name: create fastd directories
|
|
|
|
file:
|
2017-11-06 21:24:56 +01:00
|
|
|
path: "/etc/fastd/{{ item.0.id }}vpn-{{ item.1.mtu }}"
|
2017-09-05 12:01:27 +02:00
|
|
|
state: directory
|
|
|
|
mode: 0755
|
2018-09-16 12:38:33 +02:00
|
|
|
loop: "{{ meshes | subelements('fastd.nodes.instances') }}"
|
2017-09-05 12:01:27 +02:00
|
|
|
|
|
|
|
- name: template fastd mesh config
|
|
|
|
template:
|
|
|
|
src: fastd-mesh.conf.j2
|
2017-11-06 21:24:56 +01:00
|
|
|
dest: "/etc/fastd/{{ item.0.id }}vpn-{{ item.1.mtu }}/fastd.conf"
|
2017-10-06 10:33:38 +02:00
|
|
|
mode: 0640
|
2019-03-18 16:11:34 +01:00
|
|
|
notify: restart fastd mesh instances
|
|
|
|
loop: "{{ meshes | subelements('fastd.nodes.instances') }}"
|
2019-04-09 12:50:32 +02:00
|
|
|
tags: debug
|
2017-10-06 10:33:38 +02:00
|
|
|
|
2019-04-04 11:56:45 +02:00
|
|
|
- name: install redis-server
|
|
|
|
apt:
|
|
|
|
name: redis-server
|
|
|
|
state: latest
|
|
|
|
default_release: stretch-backports
|
|
|
|
|
|
|
|
- name: build fastd-limiter
|
|
|
|
shell: "go get -v -u github.com/freifunk-mwu/fastd-limiter"
|
|
|
|
environment:
|
|
|
|
GOPATH: "{{ gopath }}"
|
|
|
|
|
2019-04-04 20:21:31 +02:00
|
|
|
- name: configure systemd unit for redis-server
|
|
|
|
systemd:
|
|
|
|
name: redis-server.service
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
|
2019-04-04 11:56:45 +02:00
|
|
|
- name: write fastd-limiter config
|
|
|
|
template:
|
|
|
|
src: fastd-limiter.yaml.j2
|
|
|
|
dest: /etc/fastd-limiter.yaml
|
|
|
|
owner: admin
|
|
|
|
group: admin
|
|
|
|
mode: 0644
|
|
|
|
|
|
|
|
- name: write systemd units for fastd-limiter
|
|
|
|
template:
|
|
|
|
src: "{{ item }}.j2"
|
|
|
|
dest: "/etc/systemd/system/{{ item }}"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: reload systemd
|
|
|
|
loop:
|
|
|
|
- fastd-limiter-limit.service
|
|
|
|
- fastd-limiter-limit.timer
|
|
|
|
- fastd-limiter-peers.service
|
|
|
|
- fastd-limiter-peers.timer
|
|
|
|
|
|
|
|
- name: configure systemd timers for fastd-limiter
|
|
|
|
systemd:
|
|
|
|
name: "{{ item }}"
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
loop:
|
|
|
|
- fastd-limiter-limit.timer
|
|
|
|
- fastd-limiter-peers.timer
|
|
|
|
|
2017-10-03 23:30:02 +02:00
|
|
|
- name: write systemd unit fastd-sync-meshkeys.service
|
|
|
|
template:
|
|
|
|
src: fastd-sync-meshkeys.service.j2
|
|
|
|
dest: /etc/systemd/system/fastd-sync-meshkeys.service
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: reload systemd
|
|
|
|
|
|
|
|
- name: write systemd timer fastd-sync-meshkeys.timer
|
|
|
|
template:
|
|
|
|
src: fastd-sync-meshkeys.timer.j2
|
|
|
|
dest: /etc/systemd/system/fastd-sync-meshkeys.timer
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: reload systemd
|
|
|
|
|
2017-10-06 11:47:09 +02:00
|
|
|
- name: configure systemd timers for fastd-mesh instance
|
2017-10-03 23:30:02 +02:00
|
|
|
systemd:
|
2017-10-06 11:47:09 +02:00
|
|
|
name: "{{ item }}.timer"
|
2017-10-03 23:30:02 +02:00
|
|
|
enabled: yes
|
|
|
|
state: started
|
2018-09-16 12:38:33 +02:00
|
|
|
loop:
|
2017-10-06 11:47:09 +02:00
|
|
|
- fastd-sync-meshkeys
|
|
|
|
- fastd-peer-limit-update
|
2017-10-26 22:35:55 +02:00
|
|
|
|
|
|
|
- name: configure systemd unit fastd@
|
|
|
|
systemd:
|
2017-11-06 21:24:56 +01:00
|
|
|
name: "fastd@{{ item.0.id }}vpn-{{ item.1.mtu }}"
|
2017-10-26 22:35:55 +02:00
|
|
|
enabled: yes
|
|
|
|
state: started
|
2018-09-16 12:38:33 +02:00
|
|
|
loop: "{{ meshes | subelements('fastd.nodes.instances') }}"
|
2018-09-25 10:38:41 +02:00
|
|
|
|
|
|
|
- name: build fastd-exporter binary
|
2019-03-14 15:35:47 +01:00
|
|
|
shell: "go get -v -u github.com/freifunk-darmstadt/fastd-exporter"
|
|
|
|
environment:
|
|
|
|
GOPATH: "{{ gopath }}"
|
2018-09-25 10:38:41 +02:00
|
|
|
notify: restart fastd-exporter
|
|
|
|
|
|
|
|
- name: copy vhost fastd_exporter.conf
|
|
|
|
template:
|
|
|
|
src: "fastd_exporter_vhost.conf.j2"
|
|
|
|
dest: "/etc/nginx/conf.d/fastd_exporter.conf"
|
|
|
|
notify: restart nginx
|
|
|
|
|
|
|
|
- name: create systemd unit for fastd-exporter
|
|
|
|
template:
|
|
|
|
src: "fastd-exporter.service.j2"
|
|
|
|
dest: "/etc/systemd/system/fastd-exporter.service"
|
2019-03-11 10:34:25 +01:00
|
|
|
notify:
|
|
|
|
- reload systemd
|
|
|
|
- restart fastd-exporter
|
2018-09-25 10:38:41 +02:00
|
|
|
|
|
|
|
- name: configure fastd-exporter systemd unit
|
|
|
|
systemd:
|
|
|
|
name: "fastd-exporter.service"
|
|
|
|
enabled: yes
|
|
|
|
state: started
|