From 37a205e8a097e081314634999c016cfd6f3489dd Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 12 Aug 2022 13:30:22 -0500 Subject: [PATCH] ci: lib: Configure SSH key for Ansible In order for Jenkins to apply configuration policy on machines that are not members of the *pyrocufflink.blue* domain, it needs to use an SSH private key for authentication. --- vars/applyConfigPolicy.groovy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vars/applyConfigPolicy.groovy b/vars/applyConfigPolicy.groovy index e64ab29..bea6eac 100644 --- a/vars/applyConfigPolicy.groovy +++ b/vars/applyConfigPolicy.groovy @@ -61,6 +61,7 @@ def stageRemountRW(limit) { playbook: 'remount.yml', limit: limit, become: true, + credentialsId: 'jenkins-cfgmgmt', vaultCredentialsId: 'ansible-vault', extraVars: [ remount_state: 'rw', @@ -78,6 +79,7 @@ def generateStages(stages) { ansiblePlaybook \ playbook: playbook, become: true, + credentialsId: 'jenkins-cfgmgmt', vaultCredentialsId: 'ansible-vault', extras: '--diff', skippedTags: 'install' @@ -94,6 +96,7 @@ def stageRemountRO(limit) { playbook: 'remount.yml', limit: limit + ':!rw-root', become: true, + credentialsId: 'jenkins-cfgmgmt', vaultCredentialsId: 'ansible-vault', extras: '--diff' } else {