introduce peerconf.sh

This commit is contained in:
h 2025-01-25 14:26:51 -08:00
parent 503947f897
commit 2204ce80c6
Signed by: 9pfs
SSH key fingerprint: SHA256:jgJ8oy3dFgbNXEiRdZlbUhItY8fbh4UvvJ2qhxoOC88
2 changed files with 9 additions and 0 deletions

4
peerconf.sh.j2 Normal file
View file

@ -0,0 +1,4 @@
#!/bin/sh
set -x && \
source /usr/local/bin/mkpeerkey.sh && \
echo "AS 4242422002 llv6 {{ llv6 }} wgkey $(cat /etc/systemd/network/$1.pub) IPv4 $(curl -4s api.ipify.io) IPv6 $(curl -6s api.ipify.io)"

View file

@ -109,3 +109,8 @@
src: mkpeerkey.sh
dest: /usr/local/bin/mkpeerkey.sh
mode: '0755'
- name: Push peerconf.sh to hosts
ansible.builtin.template:
src: peerconf.sh.j2
dest: /usr/local/bin/peerconf.sh
mode: '0755'