Apt packages

Use something like this:

apt: name="{{ item }}" ...
with_items: your_package_list

and call the playbook with

ansible-playbook -e 'your_package_list=[foo,bar,xyz]'

Untested!

Johannes

Damn, I get the list thing wrong each time..

https://docs.ansible.com/ansible/YAMLSyntax.html
fruits: ['Apple', 'Orange', 'Strawberry', 'Mango']

Try this: ansible-playbook -e "your_package_list=['foo','bar','xyz']"

Johannes

Thanks, working now