add mkpeerpsk.sh

This commit is contained in:
h 2025-01-25 15:43:41 -08:00
parent be4224107f
commit bcb0e23588
Signed by: 9pfs
SSH key fingerprint: SHA256:jgJ8oy3dFgbNXEiRdZlbUhItY8fbh4UvvJ2qhxoOC88
2 changed files with 12 additions and 0 deletions

7
mkpeerpsk.sh Normal file
View file

@ -0,0 +1,7 @@
#!/bin/bash
set -x
cd /etc/systemd/network && \
wg genpsk > "$1".psk && \
chmod o-rwx "$1".psk && \
chown root:systemd-network "$1".psk && \
cat "$1".psk

View file

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