ci: samba-dc: Use Kerberos authentication
parent
ac215ab520
commit
b13164f77e
|
@ -10,27 +10,39 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Prepare') {
|
stage('kinit') {
|
||||||
steps {
|
steps {
|
||||||
withCredentials([file(
|
withCredentials([file(
|
||||||
credentialsId: 'vault-jenkins@pyrocufflink.blue',
|
credentialsId: 'keytab-jenkins@pyrocufflink.blue',
|
||||||
variable: 'SUDO_PASS_FILE')]) {
|
variable: 'KEYTAB')]) {
|
||||||
sh 'cp -f "${SUDO_PASS_FILE}" sudo-pass'
|
sh 'kinit -kt "${KEYTAB}" jenkins@PYROCUFFLINK.BLUE'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Domain Controller') {
|
stage('Domain Controller') {
|
||||||
steps {
|
steps {
|
||||||
withCredentials([file(
|
withCredentials([
|
||||||
credentialsId: 'ansible-vault',
|
file(
|
||||||
variable: 'ANSIBLE_VAULT_PASSWORD_FILE')]) {
|
credentialsId: 'ansible-vault',
|
||||||
sshagent(['jenkins-ssh']) {
|
variable: 'ANSIBLE_VAULT_PASSWORD_FILE',
|
||||||
sh 'ansible-playbook --check --diff -b domain-controller.yml -e @sudo-pass'
|
),
|
||||||
}
|
file(
|
||||||
|
credentialsId: 'vault-jenkins@pyrocufflink.blue',
|
||||||
|
variable: 'SUDO_PASS_FILE',
|
||||||
|
),
|
||||||
|
]) {
|
||||||
|
sh '''
|
||||||
|
ansible-playbook --check --diff -b domain-controller.yml -e "@${SUDO_PASS_FILE}"
|
||||||
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
sh 'kdestroy'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue