From 32f2ece9449ab3a2754c286640d4895f297f2c22 Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi Date: Fri, 8 Aug 2025 16:28:40 +0200 Subject: [PATCH] change ansible password only on user creation --- ansible/bootstrap.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/bootstrap.yml b/ansible/bootstrap.yml index de82a52..40abdb1 100644 --- a/ansible/bootstrap.yml +++ b/ansible/bootstrap.yml @@ -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