You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
771 B
YAML
27 lines
771 B
YAML
---
|
|
|
|
- name: Add config of backbones
|
|
copy:
|
|
content: |
|
|
{{ lookup('file', global_wireguard_peers_directory + '/' + item) }}
|
|
PersistentKeepalive={{ keepalive_timeout }}
|
|
dest: "{{ netdev_directory }}/{{ item }}.conf"
|
|
owner: root
|
|
group: root
|
|
mode: "u=rw,g=r,o=r"
|
|
when: "item != inventory_hostname"
|
|
loop: "{{ groups['wireguard_backbones'] }}"
|
|
notify:
|
|
- restart systemd network
|
|
|
|
- name: Store public key to backbones
|
|
copy:
|
|
src: "{{ global_wireguard_peers_directory }}/{{ inventory_hostname }}"
|
|
dest: "{{ netdev_directory }}/{{ inventory_hostname }}.conf"
|
|
owner: root
|
|
group: root
|
|
mode: "u=rw,g=r,o=r"
|
|
delegate_to: "{{ item }}"
|
|
when: "item != inventory_hostname"
|
|
loop: "{{ groups['wireguard_backbones'] }}"
|