2017-03-26 21:33:16 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Install fastd
|
2017-06-30 11:59:14 +02:00
|
|
|
apt: name=fastd state=latest
|
2017-03-26 21:33:16 +02:00
|
|
|
|
|
|
|
- name: Install haveged (to create entropy)
|
|
|
|
apt: name=haveged
|
|
|
|
|
2017-11-09 21:21:19 +01:00
|
|
|
- name: Systemd unit for fastd
|
|
|
|
copy: src=fastd@.service dest=/etc/systemd/system/fastd@.service
|
2017-03-26 21:33:16 +02:00
|
|
|
notify:
|
|
|
|
- Reload systemd
|
|
|
|
- Restart fastd
|
|
|
|
|
2017-03-27 23:29:09 +02:00
|
|
|
- name: Disable fastd default instance
|
|
|
|
service: name=fastd enabled=no
|
|
|
|
|
2017-03-26 21:33:16 +02:00
|
|
|
- name: Create directories
|
|
|
|
file: path=/etc/fastd/{{ fastd_instance }}/peers state=directory
|
|
|
|
|
|
|
|
- name: Configure fastd
|
|
|
|
template: src=fastd.conf.j2 dest=/etc/fastd/{{ fastd_instance }}/fastd.conf
|
|
|
|
notify: Restart fastd
|
|
|
|
|
|
|
|
- name: Generate fastd secret
|
2017-11-09 21:21:19 +01:00
|
|
|
fastd_key: path=/etc/fastd/{{ fastd_instance }}/secret.conf
|
2017-03-26 21:33:16 +02:00
|
|
|
notify: Restart fastd
|
2017-03-27 23:29:09 +02:00
|
|
|
|
2018-01-14 20:23:08 +01:00
|
|
|
- name: Make sure at least a dummy blacklist.sh is available
|
|
|
|
copy: src=blacklist.sh dest=/etc/fastd/{{ fastd_instance }}/blacklist.sh mode=0755 force=no
|
|
|
|
|
2017-11-09 21:21:19 +01:00
|
|
|
- name: Enable fastd {{ fastd_instance }}
|
|
|
|
service: name=fastd@{{ fastd_instance }} enabled=yes
|