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

18 views
Skip to first unread message

Sagayaraj A

unread,
Jan 21, 2015, 7:23:43 AM1/21/15
to ansible...@googlegroups.com
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

Brian Coca

unread,
Jan 21, 2015, 9:44:08 AM1/21/15
to ansible...@googlegroups.com
you could use lookup('file', ...) and/or lookup('csvfile',) either
directly or using with_<lookup plugin>




--
Brian Coca
Reply all
Reply to author
Forward
0 new messages