ci: dch-gw: Switch to ansiblePlaybook steps
parent
cccb442c08
commit
4148ce02a5
|
@ -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'
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue