Advertisement
PandaAcademy

Jenkinsfile_run_ansible

May 28th, 2022 (edited)
1,642
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.50 KB | None | 0 0
  1.         stage('Run Ansible') {
  2.                steps {
  3.                    script {
  4.                         sh "pip3 install -r requirements.txt"
  5.                         sh "ansible-galaxy install -r requirements.yml"
  6.                         withEnv(["FRONTEND_IMAGE=$frontendImage:$frontendDockerTag",
  7.                                  "BACKEND_IMAGE=$backendImage:$backendDockerTag"]) {
  8.                             ansiblePlaybook inventory: 'inventory', playbook: 'playbook.yml'
  9.                         }
  10.                 }
  11.             }
  12.         }
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement