Use handler so that we actually have a users table when we go to add the admin
This commit is contained in:
parent
35138d98e1
commit
181f8835e2
19
roles/gitea/handlers/main.yml
Normal file
19
roles/gitea/handlers/main.yml
Normal file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- name: Create default 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
|
@ -87,21 +87,8 @@
|
||||
mode: "0640"
|
||||
owner: "root"
|
||||
group: "git"
|
||||
- name: Create default 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_user: git
|
||||
notify: gitea add default user
|
||||
when: not p.stat.exists
|
||||
- name: Template out service
|
||||
template:
|
||||
|
Loading…
Reference in New Issue
Block a user