fix provision over dns
This commit is contained in:
parent
dfb46d76a5
commit
7fa2a8056d
3 changed files with 8 additions and 2 deletions
|
@ -78,6 +78,12 @@ class DnsRecord(Validateable):
|
||||||
result.append("ipv4 & ipv6 may not both be empty.")
|
result.append("ipv4 & ipv6 may not both be empty.")
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def ip(self) -> str:
|
||||||
|
if (self.ipv4):
|
||||||
|
return self.ipv4
|
||||||
|
else:
|
||||||
|
return self.ipv6
|
||||||
|
|
||||||
|
|
||||||
class Devops(Validateable):
|
class Devops(Validateable):
|
||||||
def __init__(
|
def __init__(
|
||||||
|
|
|
@ -86,7 +86,7 @@ class K3s(Validateable):
|
||||||
cmd = [
|
cmd = [
|
||||||
"provs-server.jar",
|
"provs-server.jar",
|
||||||
"k3s",
|
"k3s",
|
||||||
f"{self.k3s_provision_user}@{self.provision_dns.fqdn}",
|
f"{self.k3s_provision_user}@{self.provision_dns.ip()}",
|
||||||
"-c",
|
"-c",
|
||||||
f"{devops.build_path()}/out_k3sServerConfig.yaml",
|
f"{devops.build_path()}/out_k3sServerConfig.yaml",
|
||||||
"-a",
|
"-a",
|
||||||
|
|
|
@ -24,7 +24,7 @@ def test_should_calculate_command():
|
||||||
assert (
|
assert (
|
||||||
"provs-server.jar "
|
"provs-server.jar "
|
||||||
+ "k3s "
|
+ "k3s "
|
||||||
+ "k3s_provision_user@example.org "
|
+ "k3s_provision_user@::1 "
|
||||||
+ "-c "
|
+ "-c "
|
||||||
+ "root_path/target/name/module/out_k3sServerConfig.yaml "
|
+ "root_path/target/name/module/out_k3sServerConfig.yaml "
|
||||||
+ "-a "
|
+ "-a "
|
||||||
|
|
Loading…
Reference in a new issue