Ansible Filters
1 min read
Ansible filters transform variables in templates and playbooks, building on Jinja2's filter system ({{ value | filter }}). The most useful built-in filters:
General
urlsplit, unique, to_datetime, strftime, splitext, split, shuffle, regex_findall, regex_search, regex_replace, permutations, md5, intersect, human_to_bytes, human_readable, hash, difference, combine, comment, community.general.json_query
Serialization
b64decode, b64encode, to_yaml, to_json, from_yaml, from_json
Paths
relpath, path_join, dirname, commonpath, basename
See the official filter documentation for the full list and usage.