pipeline { agent any stages { stage('Clone Repository') { steps { script { sh 'git clone http://dev.xlinfo.lan/git/iac/incus.git || git checkout' } } } stage('Terraform Init') { steps { dir('final') { sh 'terraform init' } } } stage('Terraform Apply') { steps { dir('final') { sh 'terraform apply -auto-approve' } } } stage('Run Ansible Playbook') { steps { dir('final') { sh ''' ansible-playbook -i hosts lamp.yml ''' } } } } }