ci: dch-gw: Switch to ansiblePlaybook steps

jenkins-master
Dustin 2018-04-15 10:14:41 -05:00
parent cccb442c08
commit 4148ce02a5
1 changed files with 18 additions and 14 deletions

View File

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