Skip to content

Commit

Permalink
Switch from Host to Hostname() so that ports are removed
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardecook committed Sep 13, 2019
1 parent 4ee8f93 commit 4b86fe8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bosh/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (r Runner) Run(data environment.Config, dryRun bool, boshArgs ...string) er
fmt.Sprintf(`echo "%s" >"$ssh_key_path"`, data.OpsManager.PrivateKey),
fmt.Sprintf(`chmod 0600 "${ssh_key_path}"`),

fmt.Sprintf(`ops_manager_ip="$(dig +short %s)"`, data.OpsManager.URL.Host),
fmt.Sprintf(`ops_manager_ip="$(dig +short %s)"`, data.OpsManager.URL.Hostname()),

fmt.Sprintf(`bosh_ca_path=$(mktemp)`),
fmt.Sprintf(`ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -i "${ssh_key_path}" ubuntu@${ops_manager_ip} cat /var/tempest/workspaces/default/root_ca_certificate 1>${bosh_ca_path} 2>/dev/null`),
Expand Down
2 changes: 1 addition & 1 deletion ssh/director_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (b DirectorRunner) Run(data environment.Config, dryRun bool, args ...string
fmt.Sprintf(`echo "%s" >"$ssh_key_path"`, data.OpsManager.PrivateKey),
fmt.Sprintf(`chmod 0600 "${ssh_key_path}"`),

fmt.Sprintf(`ops_manager_ip="$(dig +short %s)"`, data.OpsManager.URL.Host),
fmt.Sprintf(`ops_manager_ip="$(dig +short %s)"`, data.OpsManager.URL.Hostname()),

fmt.Sprintf(`director_ssh_key="$(om -t %s -k -u %s -p %s curl -s -p %s | jq -r %s)"`, data.OpsManager.URL.String(), data.OpsManager.Username, data.OpsManager.Password, bbrCredsPath, privateKeyPath),
fmt.Sprintf(`director_ssh_key_path=$(mktemp)`),
Expand Down
2 changes: 1 addition & 1 deletion ssh/opsmanager_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (b OpsManagerRunner) Run(data environment.Config, dryRun bool, args ...stri
fmt.Sprintf(`trap 'rm -f ${ssh_key_path}' EXIT`),
fmt.Sprintf(`chmod 0600 "${ssh_key_path}"`),

fmt.Sprintf(`ops_manager_ip="$(dig +short %s)"`, data.OpsManager.URL.Host),
fmt.Sprintf(`ops_manager_ip="$(dig +short %s)"`, data.OpsManager.URL.Hostname()),

fmt.Sprintf(`creds="$(om -t %s -k -u %s -p %s curl -s -p %s)"`, data.OpsManager.URL.String(), data.OpsManager.Username, data.OpsManager.Password, "/api/v0/deployed/director/credentials/bosh_commandline_credentials"),
fmt.Sprintf(`bosh="$(echo "$creds" | jq -r .credential | tr ' ' '\n' | grep '=')"`),
Expand Down
2 changes: 1 addition & 1 deletion sshuttle/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (b Runner) Run(data environment.Config, dryRun bool, args ...string) error
fmt.Sprintf(`trap 'rm -f ${ssh_key_path}' EXIT`),
fmt.Sprintf(`chmod 0600 "${ssh_key_path}"`),

fmt.Sprintf(`ops_manager_ip="$(dig +short %s)"`, data.OpsManager.URL.Host),
fmt.Sprintf(`ops_manager_ip="$(dig +short %s)"`, data.OpsManager.URL.Hostname()),

fmt.Sprintf(`cidrs="$(om -t %s -k -u %s -p %s curl -s -p %s | jq -r %s | xargs echo)"`,
data.OpsManager.URL.String(), data.OpsManager.Username, data.OpsManager.Password, networksPath, cidrPath),
Expand Down

0 comments on commit 4b86fe8

Please sign in to comment.