From 53502ae102eb54383ec20537d669b202f3b00dec Mon Sep 17 00:00:00 2001 From: Koen Ekelschot Date: Sun, 7 Apr 2024 13:40:10 +0200 Subject: [PATCH] Fix creation of users Signed-off-by: Koen Ekelschot --- tasks/local_git_users.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/local_git_users.yml b/tasks/local_git_users.yml index c2a3c1d..3a741c9 100644 --- a/tasks/local_git_users.yml +++ b/tasks/local_git_users.yml @@ -2,7 +2,7 @@ - name: Identify gitea users ansible.builtin.command: su - {{ gitea_user }} -c '{{ gitea_full_executable_path }} -c {{ gitea_configuration_path }}/gitea.ini admin user list' become: true - register: _giteusers + register: _giteausers changed_when: false - name: Use gitea cli to create user @@ -18,5 +18,5 @@ - '"successfully created" not in gitearesult.stdout' changed_when: - '"successfully created!" in gitearesult.stdout' - when: "_giteusers is defined and item.name in _giteusers" + when: "_giteausers is defined and item.name not in _giteausers" loop: "{{ gitea_users }}"