Hello All,
I have ansible-playbook which has variables defined and that playbook is executed successfully from jenkins by creating job.
my query is :
I need to pass ansible variables defined in playbook from jenkins ,as parameter(or what ever),so it would eliminate hard coding in ansible-playbook.
Searched a lot but couldn’t get exact solution.
Request anyone to help me at the earliest
Thanks in advance
-e allows you to pass variables to the command line. So you can put that in your job. Also, there’s an ansible jenkins plugin. You can take a look at that.
https://wiki.jenkins.io/display/JENKINS/Ansible+Plugin
Thanks Adrian
command line parameters we could give ,but that also we need to open jenkins job and then add the variables.
My intention is we just give parameter like string parameter in jenkins and it would map to ansible variables .
Request to help me.