change ansible password only on user creation

This commit is contained in:
Fabio Sinibaldi 2025-08-08 16:28:40 +02:00
parent 3bfd89e1b6
commit 32f2ece944
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,8 @@
# Directly generate hash
# https://www.lisenet.com/2019/ansible-generate-crypted-passwords-for-the-user-module/
password: "{{ ansible_crypted_password | password_hash('sha512') }}"
shell: /bin/bash
shell: /bin/bash
update_password: on_create
system: yes
home: /srv/ansible
state: present