From 21a138fb9a8189fa62bc14c45dbd9e44b35d4a8b Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Thu, 18 Jan 2024 11:48:59 +0100 Subject: [PATCH] add root as managing_user fallback --- roles/diagnostic/tasks/setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/diagnostic/tasks/setup.yml b/roles/diagnostic/tasks/setup.yml index 0f641b1..23b8028 100644 --- a/roles/diagnostic/tasks/setup.yml +++ b/roles/diagnostic/tasks/setup.yml @@ -2,7 +2,7 @@ - name: Set facts ansible.builtin.set_fact: - managing_user: "{{ ansible_user | default(ansible_env.USER) }}" + managing_user: "{{ ansible_user | default(ansible_env.USER) | default('root') }}" # Update should never be updated here because user already exists, # but we have to specify it because otherwise ansible user reset password to empty string