How specify a list value as variable in ansible inventory file?
With complex variables, it's best to define them in a host_vars file rather than in the inventory file, since host_vars files support YAML syntax.
Try creating a host_vars/127.0.0.1
file with the following content:
---
timezone: Europe/Amsterdam
locales:
- en_US
- nl_NL
You can pass a list or object like this:
[example]
127.0.0.1 timezone="Europe/Amsterdam" locales='["en_US", "nl_NL"]'