Define the server on which you want to install Jenkins in the playbook.yml
hosts: your_ubuntu_serverInstall provider
terraform initThe Terraform plan command creates an execution plan, which lets you preview the changes that Terraform plans to make to your infrastructure
terraform planDeploy vm on Vsphere
terraform applyjobs:
- 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')
}
}
}