You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/lib/ansible/plugins/filter/password_hash.yml

39 lines
1.3 KiB
YAML

DOCUMENTATION:
name: password_hash
version_added: "historical"
short_description: convert input password into password_hash
description:
- Returns a password_hash of a secret.
positional: _input
notes:
- Algorithms available might be restricted by the system.
- Algorithms may restrict salt length or content. For example, Blowfish/bcrypt requires a 22-character salt.
options:
_input:
description: Secret to hash.
type: string
required: true
hashtype:
description: Hashing algorithm to use.
type: string
default: sha512
choices: [ md5, blowfish, sha256, sha512, bcrypt ]
salt:
description: Secret string used for the hashing. If none is provided a random one can be generated. Use only numbers and letters (characters matching V([./0-9A-Za-z]+)).
type: string
rounds:
description: Number of encryption rounds, default varies by algorithm used.
type: int
ident:
description: Algorithm identifier.
type: string
EXAMPLES: |
# pwdhash => "$6$/bQCntzQ7VrgVcFa$VaMkmevkY1dqrx8neaenUDlVU.6L/.ojRbrnI4ID.yBHU6XON1cB422scCiXfUL5wRucMdLgJU0Fn38uoeBni/"
pwdhash: "{{ 'testing' | password_hash }}"
RETURN:
_value:
description: The resulting password hash.
type: string