Skip to content

Commit

Permalink
remove another unnecessary key from template.
Browse files Browse the repository at this point in the history
  • Loading branch information
kulatung committed Apr 20, 2018
1 parent 4427eee commit 6fd3cbf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/config/template.go
Expand Up @@ -32,7 +32,7 @@ func configTemplatePrefix(answerData map[string]interface{}) string {
#
# Answers:`)
for key, value := range answerData {
if key == "config_dir" || key == "pem_dir" || key == "active_extra_templates" {
if key == "config_dir" || key == "pem_dir" || key == "active_extra_templates" || key == "ui_group_priority" {
continue
}

Expand Down
14 changes: 9 additions & 5 deletions pkg/connect/connect.go
Expand Up @@ -20,17 +20,21 @@ func (e *ConnectEngine) Start(answerData map[string]interface{}) error {
if err != nil {
return nil
}
tmplConfigName, err := utils.PopulateTemplate(tmplData.FilePath, answerData)
tmplConfigFilepath, err := utils.PopulateTemplate(tmplData.FilePath, answerData)
if err != nil {
return nil
}
tmplConfigFilepath, err = utils.ExpandPath(filepath.Join(e.Config.GetString("options.config_dir"), tmplConfigFilepath))
if err != nil {
return nil
}

//Print the lines we're running.
//Check that the bastion host is accessible.


return syscall.Exec("/bin/bash", []string{"-c",
fmt.Sprintf("ssh-add %v; ssh bastion -F %v;",
filepath.Join(e.Config.GetString("options.pem_dir"), e.Config.GetString("options.pem_filename")),
filepath.Join(e.Config.GetString("options.config_dir"), tmplConfigName)),
fmt.Sprintf("ssh bastion -F %v",
//filepath.Join(e.Config.GetString("options.pem_dir"), e.Config.GetString("options.pem_filename")),
tmplConfigFilepath),
}, []string{})
}

0 comments on commit 6fd3cbf

Please sign in to comment.