diff --git a/docs/docsite/rst/playbooks_filters.rst b/docs/docsite/rst/playbooks_filters.rst index b59838813d5..2655e9add00 100644 --- a/docs/docsite/rst/playbooks_filters.rst +++ b/docs/docsite/rst/playbooks_filters.rst @@ -622,11 +622,11 @@ Debugging Filters .. versionadded:: 2.3 -Use the ``type`` filter to display the underlying Python type of a variable. +Use the ``type_debug`` filter to display the underlying Python type of a variable. This can be useful in debugging in situations where you may need to know the exact type of a variable:: - {{ myvar | type }} + {{ myvar | type_debug }} A few useful filters are typically added with each new Ansible release. The development documentation shows diff --git a/lib/ansible/plugins/filter/core.py b/lib/ansible/plugins/filter/core.py index 70dfaacc06c..4845b29dea8 100644 --- a/lib/ansible/plugins/filter/core.py +++ b/lib/ansible/plugins/filter/core.py @@ -534,5 +534,5 @@ class FilterModule(object): 'skip' : skipped, # debug - 'type': lambda o: o.__class__.__name__, + 'type_debug': lambda o: o.__class__.__name__, }