add mkpeerpsk.sh
This commit is contained in:
parent
be4224107f
commit
bcb0e23588
2 changed files with 12 additions and 0 deletions
7
mkpeerpsk.sh
Normal file
7
mkpeerpsk.sh
Normal 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
|
|
@ -114,3 +114,8 @@
|
||||||
src: peerconf.sh.j2
|
src: peerconf.sh.j2
|
||||||
dest: /usr/local/bin/peerconf.sh
|
dest: /usr/local/bin/peerconf.sh
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
- name: Push mkpeerpsk.sh to hosts
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: mkpeerpsk.sh
|
||||||
|
dest: /usr/local/bin/mkpeerpsk.sh
|
||||||
|
mode: '0755'
|
Loading…
Reference in a new issue