blob: 75f72e581d4b2290d5087f06acb7fadc45303523 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
pipeline {
agent any
stages {
stage('Clone Repository') {
steps {
script {
sh 'git clone http://dev.xlinfo.lan/git/iac/incus.git'
}
}
}
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
'''
}
}
}
}
}
|