summaryrefslogtreecommitdiff
path: root/roles/wgnet/tasks/main.yml
blob: 04aeafce2d7bd35c295aaa6ec61bcd962c5c1b6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- name: Configure wireguard for wgnet
  ansible.builtin.template:
    src: templates/wgnet0.conf.j2
    dest: /etc/wireguard/wgnet0.conf
    owner: root
    group: root
    # Config containes private key for this host, so permissions are
    # restricted.
    mode: u+rw,g-rw,o-rw
  notify: Reload wgnet

- name: Enable wireguard service for wgnet
  ansible.builtin.service:
    name: wg-quick@wgnet0
    enabled: yes
    state: started