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
|
|
|
|
|
|
|
|
- name: Copy systemd unit file
|
|
|
|
command: /bin/cp /lib/systemd/system/fastd@.service /etc/systemd/system/fastd@.service creates=/etc/systemd/system/fastd@.service
|
|
|
|
|
|
|
|
- name: Fix systemd unit for fastd
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/systemd/system/fastd@.service
|
|
|
|
line: "ExecStopPost=/bin/rm -f /run/fastd-%I.sock"
|
|
|
|
regexp: "^ExecStopPost="
|
|
|
|
insertafter: "^ExecReload="
|
|
|
|
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
|
|
|
|
fastd_key: path=/etc/fastd/{{ site_code }}/secret.conf
|
|
|
|
notify: Restart fastd
|
2017-03-27 23:29:09 +02:00
|
|
|
|
|
|
|
- name: Enable fastd {{ site_code }}
|
|
|
|
service: name=fastd@{{ site_code }} enabled=yes
|