Files
ds_gitea/tasks/self-signed-cert.yml
DeadSwitch d0245e00b7
All checks were successful
Test the role / test-the-role (push) Successful in 8s
Configurable workdirs and paths.
2026-02-23 19:04:02 +01:00

20 lines
554 B
YAML

---
- name: Create the certs directory
ansible.builtin.file:
path: "{{ gitea_work_path }}/certs"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: '0750'
state: directory
- name: Generate the self-signed certs for Gitea
ansible.builtin.command: >
gitea cert
--host {{ gitea_domain }},{{ gitea_ssh_domain }}
--out {{ gitea_work_path }}/certs/cert.pem
--keyout {{ gitea_work_path }}/certs/key.pem
become: true
become_user: "{{ gitea_user }}"
args:
creates: "{{ gitea_work_path }}/certs/cert.pem"