From 2be0e9261826a6b0819d95a15bca7c0e98e93325 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 26 Jan 2022 16:14:09 -0700 Subject: [PATCH] users: Skip role if keys_repo is undefined Signed-off-by: Zack Cerza --- roles/users/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/users/tasks/main.yml b/roles/users/tasks/main.yml index 2958e912..f7027872 100644 --- a/roles/users/tasks/main.yml +++ b/roles/users/tasks/main.yml @@ -27,7 +27,7 @@ perform_users_role: False # perform_users_role is True by default so no need to fail the play if there's an error. ignore_errors: true - when: (keys_repo_head.stdout == sentinel_sha1.stdout) and + when: (keys_repo_head is undefined) or (keys_repo_head.stdout == sentinel_sha1.stdout) and not force_users_update|bool - import_tasks: filter_users.yml -- 2.47.3