~xenrox/ansible

b72f1f4b41aabd7bcab4e4cfff12989e5738038d — Thorben Günther 1 year, 10 months ago db12e29
misc/wireguard_keys: Generate desktop keys for internal network
1 files changed, 8 insertions(+), 0 deletions(-)

M misc/wireguard_keys.py
M misc/wireguard_keys.py => misc/wireguard_keys.py +8 -0
@@ 28,6 28,14 @@ def generate_preshared_keys():
            if not os.path.isfile(path2):
                os.symlink(path1, path2)

    # desktop access
    path = os.path.join(PATH, "localhost")
    if not os.path.isfile(path + ".key"):
        run(KEY_COMMAND.format(path, path), shell=True, check=True)
    path = os.path.join(PATH, "localhost.psk")
    if not os.path.isfile(path):
        run(PSK_COMMAND.format(path), shell=True, check=True)


def generate_vpn_keys():
    for client in VPN_CLIENTS: