How specify a list value as variable in ansible inventory file?

rmuller picture rmuller · Sep 2, 2013 · Viewed 79.7k times · Source

I need something like (ansible inventory file):

[example]
127.0.0.1 timezone="Europe/Amsterdam" locales="en_US","nl_NL"

However, ansible does not recognize 'locales' as a list.

Answer

Ryler Hockenbury picture Ryler Hockenbury · Mar 20, 2015

You can pass a list or object like this:

[example]
127.0.0.1 timezone="Europe/Amsterdam" locales='["en_US", "nl_NL"]'