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.

24 lines
766 B
YAML

5 years ago
- name: Install wg-quick@{{ peer.if.name | default(dn42_wg_default_if_prefix + peer.name) }} config
5 years ago
template:
dest: "/etc/wireguard/{{ peer.if.name | default(dn42_wg_default_if_prefix + peer.name) }}.conf"
5 years ago
src: "wg-quick.j2"
when: "peer.wg is defined"
register: "configuration"
- name: Enable wg-quick@{{ peer.if.name | default(dn42_wg_default_if_prefix + peer.name) }} service
5 years ago
service:
name: "wg-quick@{{ peer.if.name | default(dn42_wg_default_if_prefix + peer.name) }}"
5 years ago
enabled: yes
- name: Restart wg-quick@{{ peer.if.name | default(dn42_wg_default_if_prefix + peer.name) }}
5 years ago
service:
name: "wg-quick@{{ peer.if.name | default(dn42_wg_default_if_prefix + peer.name) }}"
5 years ago
state: restarted
when: "configuration is changed"