ansible-ffibk/roles/service-fastd-intragate/tasks/main.yml

46 lines
1.1 KiB
YAML
Raw Normal View History

---
- name: configure systemd unit fastd@
systemd:
name: "fastd@{{ item.id }}igVPN"
enabled: yes
with_items: "{{ meshes }}"
- name: create fastd intragate directories
file:
path: "/etc/fastd/{{ item.id }}igVPN"
state: directory
mode: 0755
with_items: "{{ meshes }}"
- name: create fastd peer intragate directories
file:
path: "/etc/fastd/{{ item.id }}igVPN/peers"
state: directory
mode: 0755
owner: admin
group: admin
with_items: "{{ meshes }}"
- name: clone fastd peer intragate repos
git:
repo: "{{ item.peers_intragate_repo }}"
dest: "/etc/fastd/{{ item.id }}igVPN/peers"
version: master
update: no
with_items: "{{ meshes }}"
become: false
- name: template fastd mesh config
template:
src: fastd-intragate.conf.j2
dest: "/etc/fastd/{{ item.id }}igVPN/fastd.conf"
notify: restart fastd intragate instances
with_items: "{{ meshes }}"
- name: write fastd intragate secret
template:
src: fastd-secret.conf.j2
dest: "/etc/fastd/{{ item.id }}igVPN/secret.conf"
notify: restart fastd intragate instances
with_items: "{{ meshes }}"