dotfiles/roles/forgejo/tasks/main.yml
Matej Focko e0f3fbe22b
fix(forgejo): handle reverse proxy
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-18 15:31:15 +01:00

29 lines
674 B
YAML

---
- name: Install the Forgejo quadlets
ansible.builtin.template:
src: "templates/{{ item }}"
dest: "/etc/containers/systemd/{{ item }}"
mode: 0644
owner: root
group: root
loop:
- forgejo.container
- forgejo.network
- forgejo.volume
- name: Install the reverse proxy config
ansible.builtin.template:
src: templates/nginx.conf
dest: "/etc/nginx/conf.d/forgejo.conf"
mode: 0644
owner: root
group: root
when: forgejo_reverse_proxy
notify: Restart nginx
- name: Enable the Forgejo quadlet
ansible.builtin.systemd_service:
daemon_reload: true
enabled: true
name: forgejo.service
state: "started"