/
Jenkinsfile
36 lines (35 loc) · 1.4 KB
/
Jenkinsfile
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
36
pipeline {
agent any
stages {
stage ('verify branch') {
steps {
echo "$GIT_BRANCH"
}
}
stage('git checkout') {
steps {
git branch: 'main', url: 'https://github.com/fakrul/nac_ansible'
}
}
stage('basic system configuration - dns, ntp, snmp') {
steps {
ansiblePlaybook disableHostKeyChecking: true, installation: 'ansible', inventory: 'hosts', playbook: 'main-commonconfig.yml', vaultCredentialsId: '5bc99d67-f650-44ce-bcc2-1aa00858124f'
}
}
stage('configure interfaces') {
steps {
ansiblePlaybook disableHostKeyChecking: true, installation: 'ansible', inventory: 'hosts', playbook: 'main-interface.yml', vaultCredentialsId: '5bc99d67-f650-44ce-bcc2-1aa00858124f'
}
}
stage('configure routing') {
steps {
ansiblePlaybook disableHostKeyChecking: true, installation: 'ansible', inventory: 'hosts', playbook: 'main-routing.yml', vaultCredentialsId: '5bc99d67-f650-44ce-bcc2-1aa00858124f'
}
}
stage('save configuration') {
steps {
ansiblePlaybook disableHostKeyChecking: true, installation: 'ansible', inventory: 'hosts', playbook: 'main-saveconfig.yml', vaultCredentialsId: '5bc99d67-f650-44ce-bcc2-1aa00858124f'
}
}
}
}