ansible-ffrgb/roles/fastd/tasks/main.yml

34 lines
935 B
YAML

---
- name: Install fastd
apt: name=fastd state=latest
- name: Install haveged (to create entropy)
apt: name=haveged
- name: Systemd unit for fastd
copy: src=fastd@.service dest=/etc/systemd/system/fastd@.service
notify:
- Reload systemd
- Restart fastd
- name: Disable fastd default instance
service: name=fastd enabled=no
- 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/{{ fastd_instance }}/secret.conf
notify: Restart fastd
- 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
- name: Enable fastd {{ fastd_instance }}
service: name=fastd@{{ fastd_instance }} enabled=yes