diff options
Diffstat (limited to 'worker/scripts/ansible_playbook.ts')
-rwxr-xr-x | worker/scripts/ansible_playbook.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/worker/scripts/ansible_playbook.ts b/worker/scripts/ansible_playbook.ts index 2048d44..f7315ab 100755 --- a/worker/scripts/ansible_playbook.ts +++ b/worker/scripts/ansible_playbook.ts @@ -72,7 +72,7 @@ await LogMetricTraceable.ofLogTraceable(_logJob) ) .map(async (tEitherJobAndSecrets) => { const eitherJobAndSecrets = await tEitherJobAndSecrets.get(); - return eitherJobAndSecrets.flatMapAsync(async ({ job, secretFiles }) => { + return eitherJobAndSecrets.flatMapAsync(async ({ job, secretFiles, vault, key }) => { const [src, sshKey, ansibleSecrets] = ( await Promise.all( [join(process.cwd(), job.arguments.path), secretFiles.ssh_key, secretFiles.ansible_secrets].map( @@ -80,6 +80,8 @@ await LogMetricTraceable.ofLogTraceable(_logJob) ), ) ).map((x) => x.right().get()); + (await vault.lock(tEitherJobAndSecrets, key)).right().get(); + const volumes = [ `${src}:/ansible`, `${sshKey}:/root/.ssh/id_ed25519`, |