Skip to content

sha1

Collection Note

This module is part of the ansible.builtin collection. To install the collection, use:

ansible-galaxy collection install ansible.builtin
Added in version historical.

Synopsis

  • Returns a L(SHA-1 hash, https://en.wikipedia.org/wiki/SHA-1) of the input data.

Parameters

Parameter Defaults / Choices Comments
_input
raw
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 Values

Key Data Type Description Returned
_value string The SHA-1 hash of the input.