pipeline { agent any environment { ANSIBLE_INVENTORY = 'jenkins-update/inventory.ini' ANSIBLE_INVENTORY_REBOOT = 'jenkins-update/inventory_reboot.ini' ANSIBLE_PLAYBOOK = 'jenkins-update/update_debian.yml' ANSIBLE_PLAYBOOK_REBOOT = 'jenkins-update/reboot_backup.yml' } stage('Mise à jour des machines Debian') { steps { // Construction et exécution de la commande Ansible sh "ansible-playbook -i ${ANSIBLE_INVENTORY} ${ANSIBLE_PLAYBOOK}" } } stage('Reboot PVE BACKUP') { steps { // Construction et exécution de la commande Ansible sh "ansible-playbook -i ${ANSIBLE_INVENTORY_REBOOT} ${ANSIBLE_PLAYBOOK_REBOOT}" } } } post { always { // Nettoyage de l'espace de travail cleanWs() } } }