password_hash – Encrypt password with AIX encryption methods
Synopsis
Encrypt the provided password with the specified AIX encryption algorithm and provided salt.
If salt is not provided, a random salt is generated.
If algorithm is not provided, the default password encryption algorithm is used, as it set on AIX.
Parameters
- password (True, str, None)
A password to encrypt.
- algorithm (False, str, None)
Password encryption algorithm from /etc/security/pwdalg.cfg.
If not specified, the filter tries to find the default encryption algorithm.
If it fails, crypt is used.
- salt (False, str, None)
A string used to encrypt the password.
If no salt is provided, a new random salt is generated.
Examples
- name: Encrypt password with default encryption algorithm and random salt
ibm.power_aix.password_hash:
password: mypassword
- name: Encrypt password with ssha512
ibm.power_aix.password_hash:
password: mypassword
algorithm: ssha512
Return Values
- _value (always, str, )
The encrypted password