++routing tests
This commit is contained in:
parent
2e6c72c093
commit
1922a0d92d
2 changed files with 14 additions and 16 deletions
|
|
@ -19,14 +19,9 @@ def configure_wireguard_server(wireguardvpnpool):
|
|||
config = wireguardvpnpool.wireguard_config
|
||||
server = wireguardvpnpool.vpn_server_hostname
|
||||
|
||||
print(f"Configuring VPN server {server}")
|
||||
#res = cdist_configure_wireguard_server.delay(config, server)
|
||||
res = cdist_configure_wireguard_server.apply_async((config, server), queue='cdist')
|
||||
|
||||
print(f"res={res}")
|
||||
res2= res.get()
|
||||
print(f"res2={res2}")
|
||||
|
||||
print(f"Configuring VPN server {server} (async)")
|
||||
# cdist_configure_wireguard_server.apply_async((config, server), queue='cdist')
|
||||
cdist_configure_wireguard_server.apply_async((config, server))
|
||||
|
||||
@shared_task
|
||||
def cdist_configure_wireguard_server(config, server):
|
||||
|
|
@ -39,6 +34,7 @@ def cdist_configure_wireguard_server(config, server):
|
|||
fname = f"/home/app/.cdist/type/__ungleich_wireguard/files/{server}"
|
||||
|
||||
print(os.uname())
|
||||
print(f"Configuring VPN server {server} (on cdist host)")
|
||||
with open(fname, "w") as fd:
|
||||
fd.write(config)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue