gitea: fix admin user setup #72

Merged
mg merged 16 commits from ga into master 2024-05-13 12:00:02 +02:00
Showing only changes of commit d0b2b2d74b - Show all commits

View file

@ -12,13 +12,8 @@
ansible.builtin.command: |
forgejo admin user create \
--config "{{ gitea_configuration_path }}/gitea.ini"
--username "{{ gitea_admin_user }}" \
--password "{{ gitea_admin_user_pass }}" \
--email "{{ gitea_admin_user }}@mgrote.net" \
--admin
--list
register: check
ignore_errors: true
failed_when: 'not "Command error: CreateUser: user already exists [name: fadmin]" in check.stderr'
- name: Ensure Admin-User exists
no_log: true
@ -31,5 +26,5 @@
--password "{{ gitea_admin_user_pass }}" \
--email "{{ gitea_admin_user }}@mgrote.net" \
--admin
when: 'not "Command error: CreateUser: user already exists [name: fadmin]" in check.stderr'
when: '"{{ gitea_admin_user }}@mgrote.net" in check.stdout'
...