pipeline { agent any stages { 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 ''' } } } } }