update mesh
This commit is contained in:
24
mesh/peers.yaml
Normal file
24
mesh/peers.yaml
Normal 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
|
||||
Reference in New Issue
Block a user