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
even without specifying the collections:
keyword.
However, we recommend you use the FQCN for easy linking to the
plugin documentation and to avoid conflicting with other collections that may have
the same filter plugin name.
Synopsis
Returns a SHA-1 hash of the input data.
Input
This describes the input of the filter, the value before | ansible.builtin.sha1
.
Parameter |
Comments |
---|---|
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 |
---|---|
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.