ansible/roles/fastd/tasks/main.yml

31 lines
779 B
YAML
Raw Normal View History

---
- name: Install fastd
apt: name=fastd state=latest
- 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
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
2017-11-09 21:21:19 +01:00
fastd_key: path=/etc/fastd/{{ fastd_instance }}/secret.conf
notify: Restart fastd
2017-11-09 21:21:19 +01:00
- name: Enable fastd {{ fastd_instance }}
service: name=fastd@{{ fastd_instance }} enabled=yes