listvariablesansibleinventory

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


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.


Solution

  • You can pass a list or object like this:

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