initial commit

This commit is contained in:
Peter Meier
2025-10-16 22:54:40 +02:00
parent d80ca5979e
commit 5e6faaffcf
23 changed files with 1608 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
---
# Nginx configuration for Gitea tasks
- name: Create Nginx configuration for {{ gitea_domain }}
template:
src: gitea-nginx-site.conf.j2
dest: "{{ nginx_config_path }}/{{ gitea_domain }}"
- name: Verify Nginx configuration file exists
stat:
path: "{{ nginx_config_path }}/{{ gitea_domain }}"
register: gitea_nginx_config_stat
- name: Enable Gitea Nginx site
file:
src: "{{ nginx_config_path }}/{{ gitea_domain }}"
dest: "/etc/nginx/sites-enabled/{{ gitea_domain }}"
state: link
when: gitea_nginx_config_stat.stat.exists
- name: Test Nginx configuration
command: nginx -t
register: nginx_test
changed_when: false
- name: Display Nginx test result
debug:
msg: "{{ nginx_test.stdout }}"
- name: Restart Nginx if configuration changed
systemd:
name: nginx
state: restarted
when: gitea_nginx_config_stat.stat.exists