introduce peerconf.sh
This commit is contained in:
parent
503947f897
commit
2204ce80c6
2 changed files with 9 additions and 0 deletions
4
peerconf.sh.j2
Normal file
4
peerconf.sh.j2
Normal 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)"
|
|
@ -109,3 +109,8 @@
|
||||||
src: mkpeerkey.sh
|
src: mkpeerkey.sh
|
||||||
dest: /usr/local/bin/mkpeerkey.sh
|
dest: /usr/local/bin/mkpeerkey.sh
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
- name: Push peerconf.sh to hosts
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: peerconf.sh.j2
|
||||||
|
dest: /usr/local/bin/peerconf.sh
|
||||||
|
mode: '0755'
|
Loading…
Reference in a new issue