1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/docs/docsite/rst/filter_guide_paths.rst
Vladimir Botka 9c146787f5
Docs split filter guide (#4103)
* Update docs. Split fiter_guide.rst to files per sections.

* Fix docs.

* Update docs. Split filter_guide_abstract_informations.rst to files per sections.

* Create section 'Merging lists of dictionaries' from the template in helper/lists_mergeby.

* Fixed indentation. Comments and notes added.

* Revert "Fixed indentation. Comments and notes added."

This reverts commit 0f38450868.

* Revert "Create section 'Merging lists of dictionaries' from the template in helper/lists_mergeby."

This reverts commit 5b9d01ec2d.
2022-01-31 05:55:23 +01:00

14 lines
633 B
ReStructuredText

Paths
-----
The ``path_join`` filter has been added in ansible-base 2.10. If you want to use this filter, but also need to support Ansible 2.9, you can use ``community.general``'s ``path_join`` shim, ``community.general.path_join``. This filter redirects to ``path_join`` for ansible-base 2.10 and ansible-core 2.11 or newer, and re-implements the filter for Ansible 2.9.
.. code-block:: yaml+jinja
# ansible-base 2.10 or newer:
path: {{ ('/etc', path, 'subdir', file) | path_join }}
# Also works with Ansible 2.9:
path: {{ ('/etc', path, 'subdir', file) | community.general.path_join }}
.. versionadded:: 3.0.0