Use MySQL query to promote new user to admin
Because that doesn't happen by default
This commit is contained in:
parent
bd38470bde
commit
0d8f6f4a97
@ -6,6 +6,8 @@
|
||||
name: gitea.service
|
||||
state: restarted
|
||||
- name: gitea add default user
|
||||
block:
|
||||
name: Create user
|
||||
command:
|
||||
argv:
|
||||
- /usr/local/bin/gitea
|
||||
@ -19,5 +21,13 @@
|
||||
- "{{ gitea_admin_email }}"
|
||||
- --config
|
||||
- /etc/gitea/app.ini
|
||||
name: Promote user to admin
|
||||
mysql_query:
|
||||
login_db: gitea
|
||||
login_user: gitea
|
||||
login_password: {{ gitea_mysql_password }}
|
||||
query: UPDATE user SET is_admin = 1 WHERE name = %s
|
||||
positional_args:
|
||||
- "{{ gitea_admin_username }}"
|
||||
become: yes
|
||||
become_user: git
|
||||
|
@ -10,6 +10,7 @@
|
||||
packages:
|
||||
- mariadb-server
|
||||
- python3-mysqldb
|
||||
- python3-pymysql
|
||||
- name: Start MySQL
|
||||
service:
|
||||
name: mysql
|
||||
|
Loading…
Reference in New Issue
Block a user