Skip to content

filter plugins

This is the list of filter plugins in the ansible.builtin collection:

Plugin Description
ansible.builtin.b64decode Decode a Base64 string
ansible.builtin.b64encode Encode a string as Base64
ansible.builtin.basename get a path's base name
ansible.builtin.bool cast into a boolean
ansible.builtin.checksum checksum of input data
ansible.builtin.combinations combinations from the elements of a list
ansible.builtin.combine combine two dictionaries
ansible.builtin.comment comment out a string
ansible.builtin.commonpath gets the common path
ansible.builtin.dict2items Convert a dictionary into an itemized list of dictionaries
ansible.builtin.difference the difference of one list from another
ansible.builtin.dirname get a path's directory name
ansible.builtin.expanduser Returns a path with C(~) translation.
ansible.builtin.expandvars expand environment variables
ansible.builtin.extract extract a value based on an index or key
ansible.builtin.fileglob explode a path glob to matching files
ansible.builtin.flatten flatten lists within a list
ansible.builtin.from_json Convert JSON string into variable structure
ansible.builtin.from_yaml Convert YAML string into variable structure
ansible.builtin.from_yaml_all Convert a series of YAML documents into a variable structure
ansible.builtin.hash hash of input data
ansible.builtin.human_readable Make bytes/bits human-readable
ansible.builtin.human_to_bytes Get bytes from string
ansible.builtin.intersect intersection of lists
ansible.builtin.items2dict Consolidate a list of itemized dictionaries into a dictionary
ansible.builtin.log log of (math operation)
ansible.builtin.mandatory make a variable's existence mandatory
ansible.builtin.md5 MD5 hash of input data
ansible.builtin.normpath Normalize a pathname
ansible.builtin.password_hash convert input password into password_hash
ansible.builtin.path_join Join one or more path components
ansible.builtin.permutations permutations from the elements of a list
ansible.builtin.pow power of (math operation)
ansible.builtin.product cartesian product of lists
ansible.builtin.quote shell quoting
ansible.builtin.random random number or list item
ansible.builtin.realpath Turn path into real path
ansible.builtin.regex_escape escape regex chars
ansible.builtin.regex_findall extract all regex matches from string
ansible.builtin.regex_replace replace a string via regex
ansible.builtin.regex_search extract regex match from string
ansible.builtin.rekey_on_member Rekey a list of dicts into a dict using a member
ansible.builtin.relpath Make a path relative
ansible.builtin.root root of (math operation)
ansible.builtin.sha1 SHA-1 hash of input data
ansible.builtin.shuffle randomize a list
ansible.builtin.split split a string into a list
ansible.builtin.splitext split a path into root and file extension
ansible.builtin.strftime date formating
ansible.builtin.subelements returns a product of a list and its elements
ansible.builtin.symmetric_difference different items from two lists
ansible.builtin.ternary Ternary operation filter
ansible.builtin.to_datetime Get C(datetime) from string
ansible.builtin.to_json Convert variable to JSON string
ansible.builtin.to_nice_json Convert variable to 'nicely formatted' JSON string
ansible.builtin.to_nice_yaml Convert variable to YAML string
ansible.builtin.to_uuid namespaced UUID generator
ansible.builtin.to_yaml Convert variable to YAML string
ansible.builtin.type_debug show input data type
ansible.builtin.union union of lists
ansible.builtin.unique set of unique items of a list
ansible.builtin.unvault Open an Ansible Vault
ansible.builtin.urldecode Decode percent-encoded sequences
ansible.builtin.urlsplit get components from URL
ansible.builtin.vault vault your secrets
ansible.builtin.win_basename Get a Windows path's base name
ansible.builtin.win_dirname Get a Windows path's directory
ansible.builtin.win_splitdrive Split a Windows path by the drive letter
ansible.builtin.zip combine list elements
ansible.builtin.zip_longest combine list elements, with filler