mirror of
https://github.com/roles-ansible/ansible_role_gitea.git
synced 2024-08-16 11:39:50 +02:00
Fix creation of users
Signed-off-by: Koen Ekelschot <koen.ekelschot@gmail.com>
This commit is contained in:
parent
19e39f9e82
commit
53502ae102
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
- name: Identify gitea users
|
- name: Identify gitea users
|
||||||
ansible.builtin.command: su - {{ gitea_user }} -c '{{ gitea_full_executable_path }} -c {{ gitea_configuration_path }}/gitea.ini admin user list'
|
ansible.builtin.command: su - {{ gitea_user }} -c '{{ gitea_full_executable_path }} -c {{ gitea_configuration_path }}/gitea.ini admin user list'
|
||||||
become: true
|
become: true
|
||||||
register: _giteusers
|
register: _giteausers
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Use gitea cli to create user
|
- name: Use gitea cli to create user
|
||||||
|
@ -18,5 +18,5 @@
|
||||||
- '"successfully created" not in gitearesult.stdout'
|
- '"successfully created" not in gitearesult.stdout'
|
||||||
changed_when:
|
changed_when:
|
||||||
- '"successfully created!" in gitearesult.stdout'
|
- '"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 }}"
|
loop: "{{ gitea_users }}"
|
||||||
|
|
Loading…
Reference in a new issue