|
|
|
@ -22,7 +22,7 @@ representation that Ansible can turn back into a list.
|
|
|
|
|
In Python3, those methods return a :ref:`dictionary view <python3:dict-views>` object. The
|
|
|
|
|
string representation that Jinja2 returns for dictionary views cannot be parsed back
|
|
|
|
|
into a list by Ansible. It is, however, easy to make this portable by
|
|
|
|
|
using the :func:`list <jinja2:list>` filter whenever using :meth:`dict.keys`,
|
|
|
|
|
using the :func:`list <jinja2:jinja-filters.list>` filter whenever using :meth:`dict.keys`,
|
|
|
|
|
:meth:`dict.values`, or :meth:`dict.items`::
|
|
|
|
|
|
|
|
|
|
vars:
|
|
|
|
@ -60,5 +60,5 @@ Python3 dictionaries do not have these methods. Use :meth:`dict.keys`, :meth:`di
|
|
|
|
|
|
|
|
|
|
.. seealso::
|
|
|
|
|
* The :ref:`pb-py-compat-dict-views` entry for information on
|
|
|
|
|
why the :func:`list filter <jinja2:list>` is necessary
|
|
|
|
|
why the :func:`list filter <jinja2:jinja-filters.list>` is necessary
|
|
|
|
|
here.
|
|
|
|
|