I'm facing an issue while using Ansible 2.9.27 on RHEL 7 to automate my infrastructure, specifically when working with encrypted passwords in my tasks.
When utilizing the password
option of the ansible.builtin.user
module to provide an encrypted password,
playbook runs fine but Ansible displays a message
[WARNING]: The input password appears not to have been hashed.
I generate the encrypted passwords using the password_hash
filter in Jinja. Here's an example of the code I'm using:
- name: Create user with encrypted password
ansible.builtin.user:
name: user
password: "{{ mypw | password_hash('sha512', mypw_salt) }}"
I store my variables in a separate file. Despite adhering to the correct syntax and guidelines, I haven't been able to resolve this.
Am I missing something?