Skip to content

Commit

Permalink
feat(be): disable host key checking by default (#2535)
Browse files Browse the repository at this point in the history
* feat(be): disable host key checking by default

* test(be): pass test

* chore: simplify code
  • Loading branch information
fiftin authored Nov 13, 2024
1 parent 70f15f4 commit 8932ea2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion db_lib/AnsiblePlaybook.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"os/exec"
"strings"

"github.com/creack/pty"
"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/pkg/task_logger"
"github.com/semaphoreui/semaphore/util"
"github.com/creack/pty"
)

type AnsiblePlaybook struct {
Expand All @@ -24,6 +24,7 @@ func (p AnsiblePlaybook) makeCmd(command string, args []string, environmentVars

cmd.Env = append(cmd.Env, "PYTHONUNBUFFERED=1")
cmd.Env = append(cmd.Env, "ANSIBLE_FORCE_COLOR=True")
cmd.Env = append(cmd.Env, "ANSIBLE_HOST_KEY_CHECKING=False")
cmd.Env = append(cmd.Env, getEnvironmentVars()...)
cmd.Env = append(cmd.Env, fmt.Sprintf("HOME=%s", util.Config.TmpPath))
cmd.Env = append(cmd.Env, fmt.Sprintf("PWD=%s", cmd.Dir))
Expand Down

0 comments on commit 8932ea2

Please sign in to comment.