aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2020-10-30 14:40:03 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2020-11-10 10:52:44 +0100
commita8e84419964d7e86e2edcb48b16360118d7e5f28 (patch)
treefa38fb65c085b3d4614ec4b4e8e9d7a87e788278 /ansible
parent81b451f1bd2d4885be56cac928be86ca27ef4d3d (diff)
downloadinfra-a8e84419964d7e86e2edcb48b16360118d7e5f28.tar.gz
infra-a8e84419964d7e86e2edcb48b16360118d7e5f28.tar.bz2
infra-a8e84419964d7e86e2edcb48b16360118d7e5f28.tar.xz
infra-a8e84419964d7e86e2edcb48b16360118d7e5f28.zip
wireguard: Mixed pub/key files. New vs0 keys.
Diffstat (limited to 'ansible')
-rw-r--r--ansible/plays/files/wireguard/vs0/akili.pub1
-rw-r--r--ansible/plays/files/wireguard/vs0/birgitte.pub2
-rw-r--r--ansible/plays/wireguard-vs0.yml11
-rw-r--r--ansible/roles/wireguard2/defaults/main.yml4
4 files changed, 9 insertions, 9 deletions
diff --git a/ansible/plays/files/wireguard/vs0/akili.pub b/ansible/plays/files/wireguard/vs0/akili.pub
new file mode 100644
index 0000000..a2538f0
--- /dev/null
+++ b/ansible/plays/files/wireguard/vs0/akili.pub
@@ -0,0 +1 @@
+2DB9LXhRUBzhKCN/gEbybDE1Rt1Lc18IOSDsxeCUS2E=
diff --git a/ansible/plays/files/wireguard/vs0/birgitte.pub b/ansible/plays/files/wireguard/vs0/birgitte.pub
index fcc93c3..ea6e08a 100644
--- a/ansible/plays/files/wireguard/vs0/birgitte.pub
+++ b/ansible/plays/files/wireguard/vs0/birgitte.pub
@@ -1 +1 @@
-NBTz38oefUN5Thj7kwcL91fV7HL+xf6iju5/AgR2bC0=
+iQ498LH696x3WXqb6pdqnZQ9XLwPH2BpRVtoKWhbtH4=
diff --git a/ansible/plays/wireguard-vs0.yml b/ansible/plays/wireguard-vs0.yml
index 04eee72..079e373 100644
--- a/ansible/plays/wireguard-vs0.yml
+++ b/ansible/plays/wireguard-vs0.yml
@@ -21,12 +21,12 @@
network: 10.137.3.0
prefix: 24
akili:
- address: 192.168.137.4/24
- network: 10.137.4.0
+ address: 192.168.137.104/24
+ network: 10.137.104.0
prefix: 24
birgitte:
- address: 192.168.137.5/24
- network: 10.137.5.0
+ address: 192.168.137.105/24
+ network: 10.137.105.0
prefix: 24
wireguard_routers:
@@ -46,6 +46,7 @@
network: "{{ networks['birgitte'].network }}/{{ networks['birgitte'].prefix }}"
state: "{{ 'absent' if ansible_hostname == 'birgitte' else 'present' }}"
+ # The peers' public keys are in plays/files/wireguard/vs0
wireguard_peers:
vimscore-1:
endpoint: vimscore-1.vimscore.com
@@ -63,12 +64,10 @@
- "{{ networks['vimscore-3'].address | ipaddr('address') }}/32"
- "{{ networks['vimscore-3'].network }}/{{ networks['vimscore-3'].prefix }}"
akili:
- public_key: UZc6XKf9ULUbBc4CI01DdCdyuj+lHvc1NQRhGJH/TE4=
allowed_ips:
- "{{ networks['akili'].address | ipaddr('address') }}/32"
- "{{ networks['akili'].network }}/{{ networks['akili'].prefix }}"
birgitte:
- public_key: NBTz38oefUN5Thj7kwcL91fV7HL+xf6iju5/AgR2bC0=
allowed_ips:
- "{{ networks['birgitte'].address | ipaddr('address') }}/32"
- "{{ networks['birgitte'].network }}/{{ networks['birgitte'].prefix }}"
diff --git a/ansible/roles/wireguard2/defaults/main.yml b/ansible/roles/wireguard2/defaults/main.yml
index 43bc7c6..3a7766b 100644
--- a/ansible/roles/wireguard2/defaults/main.yml
+++ b/ansible/roles/wireguard2/defaults/main.yml
@@ -10,5 +10,5 @@ file_index: 60
path_prefix: "/etc/systemd/network/{{ file_index }}"
netdev_path: "{{ path_prefix }}-{{ wireguard_if}}.netdev"
network_path: "{{ path_prefix }}-{{ wireguard_if}}.network"
-public_key_path: "{{ path_prefix }}-{{ wireguard_if}}.key"
-private_key_path: "{{ path_prefix }}-{{ wireguard_if}}.pub"
+public_key_path: "{{ path_prefix }}-{{ wireguard_if}}.pub"
+private_key_path: "{{ path_prefix }}-{{ wireguard_if}}.key"