diff --git a/services/tasks/LocalJob.go b/services/tasks/LocalJob.go index c17e3280..87f12031 100644 --- a/services/tasks/LocalJob.go +++ b/services/tasks/LocalJob.go @@ -183,6 +183,10 @@ func (t *LocalJob) getBashArgs(username string, incomingVersion *string) (args [ args = append(args, fmt.Sprintf("%s=%s", name, value)) } + for _, secret := range t.Environment.Secrets { + args = append(args, fmt.Sprintf("%s=%s", secret.Name, secret.Secret)) + } + return } @@ -306,6 +310,10 @@ func (t *LocalJob) getPlaybookArgs(username string, incomingVersion *string) (ar args = append(args, "--extra-vars", extraVars) } + for _, secret := range t.Environment.Secrets { + args = append(args, "--extra-vars", fmt.Sprintf("%s=%s", secret.Name, secret.Secret)) + } + var templateExtraArgs []string if t.Template.Arguments != nil { err = json.Unmarshal([]byte(*t.Template.Arguments), &templateExtraArgs)