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
|
2018-09-16 12:38:33 +02:00
|
|
|
loop: "{{ meshes | subelements('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
|
2019-03-02 18:10:48 +01:00
|
|
|
loop: "{{ meshes | selectattr('legacy', 'defined') | list | subelements('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 }}"
|
2018-09-12 16:52:51 +02:00
|
|
|
update: yes
|
2018-09-20 11:33:34 +02:00
|
|
|
tags: sync-peers
|
|
|
|
notify: reload fastd backbone instances
|
2019-03-02 18:10:48 +01:00
|
|
|
loop: "{{ meshes | selectattr('legacy', 'defined') | list | subelements('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
|
2018-09-16 12:38:33 +02:00
|
|
|
loop: "{{ meshes | subelements('fastd.backbone.instances') }}"
|
2018-11-07 15:20:18 +01:00
|
|
|
tags: debug
|
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
|
2018-09-16 12:38:33 +02:00
|
|
|
loop: "{{ meshes | subelements('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
|
2018-09-16 12:38:33 +02:00
|
|
|
loop: "{{ meshes | subelements('fastd.backbone.instances') }}"
|