add a condition for the aws node setup (ssh)

if a domain is set then we use the 'spicy-proton' hostname
otherwise it uses the private dns name
This commit is contained in:
Samuel Beaulieu 2022-07-28 13:04:24 -05:00
parent b563239e76
commit 6c0e7ac12b
No known key found for this signature in database
GPG key ID: 12030F74136D0F34

View file

@ -276,10 +276,14 @@ module Vmpooler
@redis.with_metrics do |redis|
redis.hset("vmpooler__vm__#{new_vmname}", 'host', created_instance['private_dns_name'])
end
# extra setup steps
provision_node_aws(created_instance['private_dns_name'], pool_name, new_vmname) if to_provision(pool_name) == 'true' || to_provision(pool_name) == true
dns_setup(created_instance) if domain
if domain
dns_setup(created_instance)
provision_node_aws(created_instance['name'], pool_name, new_vmname) if to_provision(pool_name) == 'true' || to_provision(pool_name) == true
elsif to_provision(pool_name) == 'true' || to_provision(pool_name) == true
provision_node_aws(created_instance['private_dns_name'], pool_name, new_vmname)
end
created_instance
end