2017-09-05 12:01:27 +02:00
|
|
|
---
|
2017-10-03 20:25:17 +02:00
|
|
|
- name: configure systemd unit fastd@
|
|
|
|
systemd:
|
2017-10-06 22:58:00 +02:00
|
|
|
name: "fastd@{{ item.id }}igVPN"
|
2017-10-03 20:25:17 +02:00
|
|
|
enabled: yes
|
2017-10-06 22:58:00 +02:00
|
|
|
with_items: "{{ meshes }}"
|
2017-09-05 12:01:27 +02:00
|
|
|
|
|
|
|
- name: create fastd intragate directories
|
|
|
|
file:
|
2017-10-06 22:58:00 +02:00
|
|
|
path: "/etc/fastd/{{ item.id }}igVPN"
|
2017-09-05 12:01:27 +02:00
|
|
|
state: directory
|
|
|
|
mode: 0755
|
2017-10-06 22:58:00 +02:00
|
|
|
with_items: "{{ meshes }}"
|
2017-09-05 12:01:27 +02:00
|
|
|
|
2017-10-03 20:25:17 +02:00
|
|
|
- name: create fastd peer intragate directories
|
|
|
|
file:
|
2017-10-06 22:58:00 +02:00
|
|
|
path: "/etc/fastd/{{ item.id }}igVPN/peers"
|
2017-10-03 20:25:17 +02:00
|
|
|
state: directory
|
|
|
|
mode: 0755
|
|
|
|
owner: admin
|
|
|
|
group: admin
|
2017-10-06 22:58:00 +02:00
|
|
|
with_items: "{{ meshes }}"
|
2017-10-03 20:25:17 +02:00
|
|
|
|
|
|
|
- name: clone fastd peer intragate repos
|
|
|
|
git:
|
2017-10-06 22:58:00 +02:00
|
|
|
repo: "{{ item.peers_intragate_repo }}"
|
|
|
|
dest: "/etc/fastd/{{ item.id }}igVPN/peers"
|
2017-10-03 20:25:17 +02:00
|
|
|
version: master
|
|
|
|
update: no
|
2017-10-06 22:58:00 +02:00
|
|
|
with_items: "{{ meshes }}"
|
2017-10-03 20:25:17 +02:00
|
|
|
become: false
|
|
|
|
|
2017-09-05 12:01:27 +02:00
|
|
|
- name: template fastd mesh config
|
|
|
|
template:
|
|
|
|
src: fastd-intragate.conf.j2
|
2017-10-06 22:58:00 +02:00
|
|
|
dest: "/etc/fastd/{{ item.id }}igVPN/fastd.conf"
|
2017-10-03 20:25:17 +02:00
|
|
|
notify: restart fastd intragate instances
|
2017-10-06 22:58:00 +02:00
|
|
|
with_items: "{{ meshes }}"
|
2017-09-05 12:01:27 +02:00
|
|
|
|
|
|
|
- name: write fastd intragate secret
|
|
|
|
template:
|
|
|
|
src: fastd-secret.conf.j2
|
2017-10-06 22:58:00 +02:00
|
|
|
dest: "/etc/fastd/{{ item.id }}igVPN/secret.conf"
|
2017-10-03 20:25:17 +02:00
|
|
|
notify: restart fastd intragate instances
|
2017-10-06 22:58:00 +02:00
|
|
|
with_items: "{{ meshes }}"
|