Use execute_live to run provs-server

This commit is contained in:
bom 2022-12-29 11:06:11 +01:00
parent d243c9d717
commit 6865cd43e8

View file

@ -106,14 +106,10 @@ class ProvsK3sMixin(DevopsBuild):
output_file.write(self.k3s_config_template.substitute(substitutes)) output_file.write(self.k3s_config_template.substitute(substitutes))
def provs_server(self, dry_run=False): def provs_server(self, dry_run=False):
result = ''
cmd = ['provs-server.jar', 'k3s', self.provision_user + '@' + self.fqdn, '-c', cmd = ['provs-server.jar', 'k3s', self.provision_user + '@' + self.fqdn, '-c',
self.build_path() + '/out_k3sServerConfig.yaml', self.build_path() + '/out_k3sServerConfig.yaml',
'-a', self.build_path() + '/' + self.app_filename_to_provision] '-a', self.build_path() + '/' + self.app_filename_to_provision]
prn_cmd = list(cmd) if dry_run:
print(" ".join(prn_cmd)) print(" ".join(cmd))
if (not dry_run): else:
result = execute(cmd) execute_live(cmd)
print(result)
return result