# how can I pass jenkins parameters as variables to var files

**URL:** <https://forum.ansible.com/t/how-can-i-pass-jenkins-parameters-as-variables-to-var-files/38009>\
**Category:** Ansible Project\
**Created:** [May 18, 2023, 6:04pm UTC](https://forum.ansible.com/t/how-can-i-pass-jenkins-parameters-as-variables-to-var-files/38009 "2023-05-18T18:04:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Narmada\_Karthika](https://avatars.discourse-cdn.com/v4/letter/n/b5e925/32.png) [@Narmada\_Karthika](https://forum.ansible.com/u/Narmada_Karthika)\
**Post date:** [May 18, 2023, 6:04pm UTC](https://forum.ansible.com/t/how-can-i-pass-jenkins-parameters-as-variables-to-var-files/38009/1 "2023-05-18T18:04:09Z")

</div>

I am trying to pass jenkins parameters as variables to run the playbook for adhoc requests  
how can I do that any suggestions please…

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [May 18, 2023, 6:26pm UTC](https://forum.ansible.com/t/how-can-i-pass-jenkins-parameters-as-variables-to-var-files/38009/2 "2023-05-18T18:26:35Z")

</div>

Ansible allows to pass in variables from the command line using the -e  
or --extra-vars option.  
I don't know about Jenkins, hence the above may be useful, or not.

---

<div class="post-metadata">

**Author:** ![Narmada\_Karthika](https://avatars.discourse-cdn.com/v4/letter/n/b5e925/32.png) [@Narmada\_Karthika](https://forum.ansible.com/u/Narmada_Karthika)\
**Post date:** [May 18, 2023, 6:29pm UTC](https://forum.ansible.com/t/how-can-i-pass-jenkins-parameters-as-variables-to-var-files/38009/3 "2023-05-18T18:29:04Z")

</div>

Thank you, I will try that option and update if that works…
