Define server which you want install Jenkins on it in the playbook.yml
hosts: your_ubuntu_server
Install provider
terraform init
The terraform plan command creates an execution plan, which lets you preview the changes that Terraform plans to make to your infrastructure
terraform plan
Deploy vm on Vsphere
terraform apply
jobs:
- script: >
freeStyleJob('MyGitHubJob') {
description('A job that clones a GitHub repository')
scm {
git {
remote {
url('https://github.com/alilotfi23/Jenkins-Automation.git')
credentials('your-github-credentials-id')
}
branches('*/main')
}
}
}