-
Notifications
You must be signed in to change notification settings - Fork 55
/
EndProject1-Steps
79 lines (29 loc) · 1.04 KB
/
EndProject1-Steps
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
37
38
39
40
41
Project 1 Execution Sample steps:
===========================
Setup a server with ansible installed and jenkins installed ==> completed
Step 2: Jenkins + Ansible Integration
======================================
Download ansible plugin in jenkins
Setup configuration of ansible plugin in jenkins
Step 3: Create a git repo with playbook and inventory file
Repo Name: https://github.com/Sonal0409/Devops_project1_demo.git
Create:
> invetory file
> index.html file
> playbook.yml
Step 4: Create jenkins & ansible pipeline
pipeline{
agent any
stages{
stage('Clone the repo'){
steps{
git branch: 'main', url: 'https://github.com/Sonal0409/Devops_project1_demo.git'
}
}
stage('Execute the playbook using Ansible'){
steps{
ansiblePlaybook credentialsId: 'ansiblehost', disableHostKeyChecking: true, installation: 'myansible', inventory: 'dev.inv', playbook: 'playbook1.yml'
}
}
}
}