From 53584b8730a0fdbc28cb78cd8a72f5f8815c99f2 Mon Sep 17 00:00:00 2001 From: Sandwich Date: Fri, 20 Feb 2026 22:28:54 +0100 Subject: [PATCH] fix(configuration): add pipefail to root password shell pipe --- roles/configuration/tasks/users.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/configuration/tasks/users.yml b/roles/configuration/tasks/users.yml index d4c6817..0887e33 100644 --- a/roles/configuration/tasks/users.yml +++ b/roles/configuration/tasks/users.yml @@ -1,7 +1,10 @@ --- - name: Set root password ansible.builtin.shell: >- + set -o pipefail && echo 'root:{{ system_cfg.root.password | password_hash("sha512") }}' | {{ chroot_command }} chpasswd -e + args: + executable: /bin/bash register: configuration_root_result changed_when: configuration_root_result.rc == 0 no_log: true