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.
26 lines
845 B
YAML
26 lines
845 B
YAML
5 years ago
|
---
|
||
|
|
||
|
- name: Add config of backbones
|
||
|
copy:
|
||
|
content: |
|
||
|
{{ lookup('file', global_wireguard_peers_directory + '/' + item) }}
|
||
|
PersistentKeepalive = {{ keepalive_timeout }}
|
||
|
dest: "{{ global_wireguard_configuration_environment_directory }}/peers/{{ item }}"
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: "u=rw,g=r,o=r"
|
||
|
when: "item != inventory_hostname"
|
||
|
loop: "{{ groups['wireguard_backbones'] }}"
|
||
|
notify: reassemble wireguard config
|
||
|
|
||
|
- name: Store public key to backbones
|
||
|
copy:
|
||
|
src: "{{ global_wireguard_peers_directory }}/{{ inventory_hostname }}"
|
||
|
dest: "{{ global_wireguard_configuration_environment_directory }}/peers/{{ inventory_hostname }}"
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: "u=rw,g=r,o=r"
|
||
|
delegate_to: "{{ item }}"
|
||
|
when: "item != inventory_hostname"
|
||
|
loop: "{{ groups['wireguard_backbones'] }}"
|