diff --git a/api/runners/runners.go b/api/runners/runners.go index 169a8ec4..0ea60f83 100644 --- a/api/runners/runners.go +++ b/api/runners/runners.go @@ -71,6 +71,10 @@ func GetRunner(w http.ResponseWriter, r *http.Request) { data.AccessKeys[*tsk.Inventory.BecomeKeyID] = tsk.Inventory.BecomeKey } + if tsk.Template.VaultKeyID != nil { + data.AccessKeys[*tsk.Template.VaultKeyID] = tsk.Template.VaultKey + } + data.AccessKeys[tsk.Repository.SSHKeyID] = tsk.Repository.SSHKey } else { diff --git a/services/runners/JobPool.go b/services/runners/JobPool.go index 9ddd8e6b..f32706e4 100644 --- a/services/runners/JobPool.go +++ b/services/runners/JobPool.go @@ -419,6 +419,10 @@ func (p *JobPool) checkNewJobs() { taskRunner.job.Inventory.BecomeKey = response.AccessKeys[*taskRunner.job.Inventory.BecomeKeyID] } + if taskRunner.job.Template.VaultKeyID != nil { + taskRunner.job.Template.VaultKey = response.AccessKeys[*taskRunner.job.Template.VaultKeyID] + } + p.queue = append(p.queue, &taskRunner) } }