|
@@ -96,7 +96,8 @@ pipeline {
|
|
sh "cat ${PKI_GIT_NAME}/${DOMAIN}/wildcard/acme-dns/letsencrypt.ca.pem >> ${CONFIG_DIR}/live/${DOMAIN}/fullchain.pem"
|
|
sh "cat ${PKI_GIT_NAME}/${DOMAIN}/wildcard/acme-dns/letsencrypt.ca.pem >> ${CONFIG_DIR}/live/${DOMAIN}/fullchain.pem"
|
|
PLAYBOOK = PKI_GIT_NAME + '/' + DOMAIN + '/wildcard/acme-dns/' + 'mail.yml'
|
|
PLAYBOOK = PKI_GIT_NAME + '/' + DOMAIN + '/wildcard/acme-dns/' + 'mail.yml'
|
|
TARGET_DIR = WORKSPACE + '/' + CONFIG_DIR
|
|
TARGET_DIR = WORKSPACE + '/' + CONFIG_DIR
|
|
- update_sertificate(PLAYBOOK, TARGET_DIR, SMTP_SERVER, DOMAIN)
|
|
|
|
|
|
+ update_zimbra(PLAYBOOK, TARGET_DIR, SMTP_SERVER, DOMAIN)
|
|
|
|
+// update_sertificate(PLAYBOOK, TARGET_DIR, SMTP_SERVER, DOMAIN)
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -157,4 +158,13 @@ def update_sertificate(String PLAYBOOK, String TARGET_DIR, String TARGET_HOST, S
|
|
colorized: true)
|
|
colorized: true)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+}
|
|
|
|
+def update_zimbra(String PLAYBOOK, String TARGET_DIR, String TARGET_HOST, String DOMAIN) {
|
|
|
|
+ withCredentials([sshUserPrivateKey(credentialsId: 'ansible', keyFileVariable: 'GIT_SSH_KEY', passphraseVariable: '', usernameVariable: 'GIT_SSH_USERNAME')]) {
|
|
|
|
+ sh """ansible-playbook ${PLAYBOOK} \
|
|
|
|
+ -u ansible -e TARGET_DIR=${TARGET_DIR}' \
|
|
|
|
+ -e TARGET_HOST=${TARGET_HOST} -e DOMAIN=${DOMAIN} \
|
|
|
|
+ --ssh-common-args='-o StrictHostKeyChecking=no'
|
|
|
|
+ """
|
|
|
|
+ }
|
|
}
|
|
}
|