Add Wireguard config 'template'
This commit is contained in:
parent
784ea6506d
commit
688aad887f
10
.ansible/roles/linux_desktop/files/wireguard.conf
Normal file
10
.ansible/roles/linux_desktop/files/wireguard.conf
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Interface]
|
||||||
|
PrivateKey =
|
||||||
|
Address =
|
||||||
|
PostUp = /usr/bin/systemd-resolve -i %i --set-dns= --set-domain=~. --set-domain=
|
||||||
|
|
||||||
|
[Peer]
|
||||||
|
PublicKey =
|
||||||
|
PreSharedKey =
|
||||||
|
EndPoint =
|
||||||
|
AllowedIPs = 0.0.0.0/0
|
|
@ -6,7 +6,7 @@
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
loop: "{{ config_repos }}"
|
loop: "{{ config_repos }}"
|
||||||
|
|
||||||
- name: Conky configuration
|
- name: 'Conky: Configuration'
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- conky
|
- conky
|
||||||
|
@ -14,3 +14,18 @@
|
||||||
src: 'templates/conkyrc.j2'
|
src: 'templates/conkyrc.j2'
|
||||||
dest: '~/.conkyrc'
|
dest: '~/.conkyrc'
|
||||||
mode: '0600'
|
mode: '0600'
|
||||||
|
|
||||||
|
- name: 'Wireguard: Configuration template'
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- wireguard
|
||||||
|
block:
|
||||||
|
- stat:
|
||||||
|
path: /etc/wireguard/wg0.conf
|
||||||
|
register: wgconfig
|
||||||
|
- copy:
|
||||||
|
dest: /etc/wireguard/wg0.conf
|
||||||
|
src: files/wireguard.conf
|
||||||
|
mode: '0400'
|
||||||
|
when: wgconfig.stat.exists == False
|
||||||
|
become: true
|
||||||
|
|
Loading…
Reference in a new issue