update mesh

This commit is contained in:
2024-06-24 17:04:36 -04:00
parent b7f93fe41d
commit 4e51d263fb
11 changed files with 54 additions and 7 deletions

24
mesh/peers.yaml Normal file
View File

@@ -0,0 +1,24 @@
- name: Add wireguard peers to each server
hosts:
- colors
- kubernetes
- truenas
- nextcloud-aio
- unifi-external
become: true
become_user: root
become_method: sudo
vars_files:
- vars.yaml
tasks:
- name: wg set peers
shell: >
wg set duconet-wg
peer {{ item.public_key }}
allowed-ips '{{ ip[item.name].address }}'
{% if item.endpoint %}
endpoint '{{ item.endpoint }}'
{% endif %}
loop: "{{ peers }}"
- name: save wg config
shell: wg-quick save duconet-wg