Do not overwrite Let's encrypt reverse-proxy configuration.

This commit is contained in:
yohan 2024-10-31 23:19:58 +01:00
parent 6fac6c8a0d
commit 8ca6fadfef

View File

@ -113,6 +113,12 @@
line: "127.0.0.1 git2.{{ DOMAIN }} git2" line: "127.0.0.1 git2.{{ DOMAIN }} git2"
become: true become: true
- name: Check if lets encrypt certificate installation is already done
stat:
path: /mnt/volumes/reverse-proxy_conf/data/reverse-proxy-gitea-le-ssl.conf
register: gitea_certificate_flag
become: true
- name: Template reverse-proxy configuration - name: Template reverse-proxy configuration
ansible.builtin.template: ansible.builtin.template:
src: "{{ item }}.j2" src: "{{ item }}.j2"
@ -124,18 +130,14 @@
become: true become: true
with_items: with_items:
- reverse-proxy-gitea.conf - reverse-proxy-gitea.conf
when: not gitea_certificate_flag.stat.exists
- name: Enable reverse-proxy configuration - name: Enable reverse-proxy configuration
containers.podman.podman_container_exec: containers.podman.podman_container_exec:
name: reverse-proxy name: reverse-proxy
command: 'sh -c ''a2ensite reverse-proxy-gitea && service apache2 reload''' command: 'sh -c ''a2ensite reverse-proxy-gitea && service apache2 reload'''
become: true become: true
when: not gitea_certificate_flag.stat.exists
- name: Check if lets encrypt certificate installation is already done
stat:
path: /mnt/volumes/reverse-proxy_conf/data/reverse-proxy-gitea-le-ssl.conf
register: gitea_certificate_flag
become: true
- name: Install lets encrypt certificate - name: Install lets encrypt certificate
containers.podman.podman_container_exec: containers.podman.podman_container_exec: