2021-03-22 21:21:25 +01:00
|
|
|
---
|
2023-08-30 01:08:02 +02:00
|
|
|
- name: Make sure gitea_register_email_confirm is false when gitea_register_manual_confirm is true
|
|
|
|
ansible.builtin.fail:
|
|
|
|
msg: |
|
|
|
|
To manually confirm registrations,
|
|
|
|
gitea_register_email_confirm needs to be false
|
|
|
|
and gitea_register_manual_confirm should be true.
|
|
|
|
when: gitea_register_manual_confirm | bool and gitea_register_email_confirm | bool
|
|
|
|
|
2021-03-22 21:21:25 +01:00
|
|
|
- name: "Configure gitea"
|
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: gitea.ini.j2
|
2023-07-19 19:38:47 +02:00
|
|
|
dest: "{{ gitea_configuration_path }}/gitea.ini"
|
2021-03-22 21:21:25 +01:00
|
|
|
owner: "{{ gitea_user }}"
|
|
|
|
group: "{{ gitea_group }}"
|
|
|
|
mode: 0600
|
|
|
|
notify: "Restart gitea"
|
|
|
|
|
|
|
|
- name: "Service gitea"
|
|
|
|
become: true
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: gitea
|
|
|
|
state: started
|
|
|
|
enabled: true
|
|
|
|
when: ansible_service_mgr == "systemd"
|