2017-09-05 12:01:27 +02:00
|
|
|
---
|
2018-07-25 14:08:45 +02:00
|
|
|
- name: create fastd backbone directories
|
2017-09-05 12:01:27 +02:00
|
|
|
file:
|
2017-11-06 21:24:56 +01:00
|
|
|
path: "/etc/fastd/{{ item.0.id }}igvpn-{{ item.1.mtu }}"
|
2017-09-05 12:01:27 +02:00
|
|
|
state: directory
|
|
|
|
mode: 0755
|
2017-10-07 00:57:35 +02:00
|
|
|
with_subelements:
|
|
|
|
- "{{ meshes }}"
|
2018-07-25 14:08:45 +02:00
|
|
|
- fastd.backbone.instances
|
2017-09-05 12:01:27 +02:00
|
|
|
|
2018-07-25 14:08:45 +02:00
|
|
|
- name: create fastd peer backbone directories
|
2017-10-03 20:25:17 +02:00
|
|
|
file:
|
2017-11-06 21:24:56 +01:00
|
|
|
path: "/etc/fastd/{{ item.0.id }}igvpn-{{ item.1.mtu }}/peers"
|
2017-10-03 20:25:17 +02:00
|
|
|
state: directory
|
|
|
|
mode: 0755
|
|
|
|
owner: admin
|
|
|
|
group: admin
|
2017-10-07 00:57:35 +02:00
|
|
|
with_subelements:
|
|
|
|
- "{{ meshes }}"
|
2018-07-25 14:08:45 +02:00
|
|
|
- fastd.backbone.instances
|
2017-10-03 20:25:17 +02:00
|
|
|
|
2018-07-25 14:08:45 +02:00
|
|
|
- name: clone fastd peer backbone repos
|
2017-10-03 20:25:17 +02:00
|
|
|
git:
|
2017-10-07 00:57:35 +02:00
|
|
|
repo: "{{ item.1.peers.repo }}"
|
2017-11-06 21:24:56 +01:00
|
|
|
dest: "/etc/fastd/{{ item.0.id }}igvpn-{{ item.1.mtu }}/peers"
|
2017-10-07 00:57:35 +02:00
|
|
|
version: "{{ item.1.peers.version }}"
|
2017-10-03 20:25:17 +02:00
|
|
|
update: no
|
2017-10-07 00:57:35 +02:00
|
|
|
with_subelements:
|
|
|
|
- "{{ meshes }}"
|
2018-07-25 14:08:45 +02:00
|
|
|
- fastd.backbone.instances
|
2017-10-03 20:25:17 +02:00
|
|
|
become: false
|
|
|
|
|
2018-07-25 14:08:45 +02:00
|
|
|
- name: template fastd backbone config
|
2017-09-05 12:01:27 +02:00
|
|
|
template:
|
2018-07-25 14:08:45 +02:00
|
|
|
src: fastd-backbone.conf.j2
|
2017-11-06 21:24:56 +01:00
|
|
|
dest: "/etc/fastd/{{ item.0.id }}igvpn-{{ item.1.mtu }}/fastd.conf"
|
2018-07-25 14:08:45 +02:00
|
|
|
notify: restart fastd backbone instances
|
2017-10-07 00:57:35 +02:00
|
|
|
with_subelements:
|
2017-10-26 22:29:15 +02:00
|
|
|
- "{{ meshes }}"
|
2018-07-25 14:08:45 +02:00
|
|
|
- fastd.backbone.instances
|
2017-09-05 12:01:27 +02:00
|
|
|
|
2018-07-25 14:08:45 +02:00
|
|
|
- name: write fastd backbone secret
|
2017-09-05 12:01:27 +02:00
|
|
|
template:
|
|
|
|
src: fastd-secret.conf.j2
|
2017-11-06 21:24:56 +01:00
|
|
|
dest: "/etc/fastd/{{ item.0.id }}igvpn-{{ item.1.mtu }}/secret.conf"
|
2018-07-25 14:08:45 +02:00
|
|
|
notify: restart fastd backbone instances
|
2017-10-07 00:57:35 +02:00
|
|
|
with_subelements:
|
|
|
|
- "{{ meshes }}"
|
2018-07-25 14:08:45 +02:00
|
|
|
- fastd.backbone.instances
|
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 }}igvpn-{{ item.1.mtu }}"
|
2017-10-26 22:35:55 +02:00
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
with_subelements:
|
|
|
|
- "{{ meshes }}"
|
2018-07-25 14:08:45 +02:00
|
|
|
- fastd.backbone.instances
|