ff
This commit is contained in:
parent
1eba10e9cb
commit
d0b2b2d74b
1 changed files with 2 additions and 7 deletions
|
@ -12,13 +12,8 @@
|
||||||
ansible.builtin.command: |
|
ansible.builtin.command: |
|
||||||
forgejo admin user create \
|
forgejo admin user create \
|
||||||
--config "{{ gitea_configuration_path }}/gitea.ini"
|
--config "{{ gitea_configuration_path }}/gitea.ini"
|
||||||
--username "{{ gitea_admin_user }}" \
|
--list
|
||||||
--password "{{ gitea_admin_user_pass }}" \
|
|
||||||
--email "{{ gitea_admin_user }}@mgrote.net" \
|
|
||||||
--admin
|
|
||||||
register: check
|
register: check
|
||||||
ignore_errors: true
|
|
||||||
failed_when: 'not "Command error: CreateUser: user already exists [name: fadmin]" in check.stderr'
|
|
||||||
|
|
||||||
- name: Ensure Admin-User exists
|
- name: Ensure Admin-User exists
|
||||||
no_log: true
|
no_log: true
|
||||||
|
@ -31,5 +26,5 @@
|
||||||
--password "{{ gitea_admin_user_pass }}" \
|
--password "{{ gitea_admin_user_pass }}" \
|
||||||
--email "{{ gitea_admin_user }}@mgrote.net" \
|
--email "{{ gitea_admin_user }}@mgrote.net" \
|
||||||
--admin
|
--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