diff --git a/ci/dch-gw.jenkinsfile b/ci/dch-gw.jenkinsfile index 33e9ddc..10b2279 100644 --- a/ci/dch-gw.jenkinsfile +++ b/ci/dch-gw.jenkinsfile @@ -22,25 +22,29 @@ pipeline { stage('Services') { steps { - withCredentials([file( - credentialsId: 'ansible-vault', - variable: 'ANSIBLE_VAULT_PASSWORD_FILE')]) { - sshagent(['jenkins-ssh']) { - sh 'ansible-playbook --diff -b dhcpd.yml radvd.yml' - } - } + ansiblePlaybook \ + playbook: 'dhcpcd.yml', + become: true, + credentialsId: 'jenkins-ssh', + vaultCredentialsId: 'ansible-vault', + extras: '--diff' + ansiblePlaybook \ + playbook: 'radvd.yml', + become: true, + credentialsId: 'jenkins-ssh', + vaultCredentialsId: 'ansible-vault', + extras: '--diff' } } stage('Firewall') { steps { - withCredentials([file( - credentialsId: 'ansible-vault', - variable: 'ANSIBLE_VAULT_PASSWORD_FILE')]) { - sshagent(['jenkins-ssh']) { - sh 'ansible-playbook --diff -b dch-gw.yml' - } - } + ansiblePlaybook \ + playbook: 'dch-gw.yml', + become: true, + credentialsId: 'jenkins-ssh', + vaultCredentialsId: 'ansible-vault', + extras: '--diff' } }