Tuesday, 5 February 2019

Trigger a ansible playbook via jenkins using jenkins API




 'curl -d ' + finalString + ' -i -X POST http://admin:<adminpassword>@<JenkinsIP>:<PortNumber>/job/<JobName>/buildWithParameters -H "Jenkins-Crumb:<crumbID>"'



finalString =   inputs for the ansible script in this format example - "ticketnumber=d" -d "deviceType=yj" -d "createnewpool=kug" -d "server=k" -d "node=y" -d "poolname=y" -d "port=y" -d "modificationtype=yy" -d "partition=yy" -d "lb_method=yy" -d "slowramptime=yy"

No comments:

Post a Comment

Git

1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...