Postgres: changed image to the :alpine
All: Check if nginx config exists before updating. This is to prevent overwriting of certbot-auto certificates and redirect
This commit is contained in:
@ -40,20 +40,20 @@
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
|
||||
- name: Check if Nginx conf file for gitea exists or not
|
||||
- name: Check if Nginx conf file exists
|
||||
stat: path="/etc/nginx/sites-available/{{ http_conf }}"
|
||||
register: status
|
||||
|
||||
- name: No need to reload Nginx
|
||||
debug: msg= {{ "No need to reload Nginx as sites-available entries have already been created" }}
|
||||
|
||||
- name: Sets Nginx conf file for gitea
|
||||
- name: Set Nginx conf file
|
||||
when: status.stat.exists == false
|
||||
template:
|
||||
src: "files/nginx.conf.j2"
|
||||
dest: "/etc/nginx/sites-available/{{ http_conf }}"
|
||||
|
||||
- name: Enables new site
|
||||
- name: Enable new site
|
||||
when: status.stat.exists == false
|
||||
file:
|
||||
src: "/etc/nginx/sites-available/{{ http_conf }}"
|
||||
|
||||
Reference in New Issue
Block a user