Fix not including tasks to add user
This commit is contained in:
parent
30bed76efe
commit
988246ac66
@ -7,4 +7,4 @@
|
||||
name: gitea.service
|
||||
state: restarted
|
||||
- name: gitea add default user
|
||||
import_tasks: tasks/add_default_user.yml
|
||||
include_tasks: tasks/add_default_user.yml
|
||||
|
@ -2,32 +2,31 @@
|
||||
#!/usr/bin/ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- name: Create user
|
||||
command:
|
||||
argv:
|
||||
- /usr/local/bin/gitea
|
||||
- admin
|
||||
- create-user
|
||||
- --username
|
||||
- "{{ gitea_admin_username }}"
|
||||
- --password
|
||||
- "{{ gitea_admin_password }}"
|
||||
- --email
|
||||
- "{{ gitea_admin_email }}"
|
||||
- --config
|
||||
- /etc/gitea/app.ini
|
||||
become: yes
|
||||
become_user: git
|
||||
- name: Promote user to admin
|
||||
command:
|
||||
argv:
|
||||
- /usr/bin/mysql
|
||||
- gitea
|
||||
- -u
|
||||
- gitea
|
||||
- -p
|
||||
- "{{ gitea_mysql_password }}"
|
||||
- -e
|
||||
- 'UPDATE user SET is_admin = 1 WHERE name = "{{ gitea_admin_username }}";'
|
||||
- block:
|
||||
- name: Create user
|
||||
command:
|
||||
argv:
|
||||
- /usr/local/bin/gitea
|
||||
- admin
|
||||
- create-user
|
||||
- --username
|
||||
- "{{ gitea_admin_username }}"
|
||||
- --password
|
||||
- "{{ gitea_admin_password }}"
|
||||
- --email
|
||||
- "{{ gitea_admin_email }}"
|
||||
- --config
|
||||
- /etc/gitea/app.ini
|
||||
- name: Promote user to admin
|
||||
command:
|
||||
argv:
|
||||
- /usr/bin/mysql
|
||||
- gitea
|
||||
- -u
|
||||
- gitea
|
||||
- -p
|
||||
- "{{ gitea_mysql_password }}"
|
||||
- -e
|
||||
- 'UPDATE user SET is_admin = 1 WHERE name = "{{ gitea_admin_username }}";'
|
||||
become: yes
|
||||
become_user: git
|
||||
|
Loading…
Reference in New Issue
Block a user