# source input from a file (exp: package names and versions from an excel or a csv)

**URL:** <https://forum.ansible.com/t/source-input-from-a-file-exp-package-names-and-versions-from-an-excel-or-a-csv/17337>\
**Category:** Ansible Project\
**Created:** [January 21, 2015, 12:23pm UTC](https://forum.ansible.com/t/source-input-from-a-file-exp-package-names-and-versions-from-an-excel-or-a-csv/17337 "2015-01-21T12:23:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sagayaraj\_A](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@Sagayaraj\_A](https://forum.ansible.com/u/Sagayaraj_A)\
**Post date:** [January 21, 2015, 12:23pm UTC](https://forum.ansible.com/t/source-input-from-a-file-exp-package-names-and-versions-from-an-excel-or-a-csv/17337/1 "2015-01-21T12:23:43Z")

</div>

I’m looking for a way to input names of packages (around 100+ packages - actually it’s dynamic) and allow ansible to run a playbook against these packages (update or install etc). I can’t seem to find anyway except by adding all the filenames into the playbook everytime using variables. Is there a better way to do it?

Regards,  
Saga

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [January 21, 2015, 2:43pm UTC](https://forum.ansible.com/t/source-input-from-a-file-exp-package-names-and-versions-from-an-excel-or-a-csv/17337/2 "2015-01-21T14:43:58Z")

</div>

you could use lookup('file', ...) and/or lookup('csvfile',) either  
directly or using with\_\<lookup plugin\>
