ansible.builtin.sha1 filter – SHA-1 hash of input data

Note

This filter plugin is part of ansible-core and included in all Ansible installations. In most cases, you can use the short plugin name sha1. However, we recommend you use the Fully Qualified Collection Name (FQCN) ansible.builtin.sha1 for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same filter plugin name.

Synopsis

Input

This describes the input of the filter, the value before | ansible.builtin.sha1.

Parameter

Comments

Input

any / required

Data to hash.

Notes

Note

  • This requires the SHA-1 algorithm to be available on the system, security contexts like FIPS might prevent this.

  • SHA-1 has been deemed insecure and is not recommended for security related uses.

Examples

# sha1hash => "dc724af18fbdd4e59189f5fe768a5f8311527050"
sha1hash: "{{ 'testing' | sha1 }}"

Return Value

Key

Description

Return value

string

The SHA-1 hash of the input.

Returned: success

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.