gitea: fix admin user setup #72
1 changed files with 2 additions and 7 deletions
|
@ -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'
|
||||
...
|
||||
|
|
Loading…
Reference in a new issue