lists as arguments

Hello,

I would like to pass a list of strings as an argument to one of my playbook to iterate it through in a with_items block.

what I’m trying to do is:

ansible-playbook a.yml -e “items=[‘test1’,‘test2’]”

Hi Nandor,

The syntax is wrong at the CLI and in the playbook :

ansible-playbook a.yml -e "{items:['test1','test2']}"

Yep, it takes JSON if you want to pass structured data.