nginx: restart nginx on nginx.conf change
This also fixes the problem mentioned in the README.
This commit is contained in:
parent
0fb059e6bf
commit
04d74b5c50
|
@ -36,5 +36,3 @@ Im Ansible-Repo müssen diese Sachen hinzugefügt werden:
|
||||||
* Individuelle Config für den Service. Wenn Docker Compose, hier weiterleiten auf den eigentlichen Dienst in Compose.
|
* Individuelle Config für den Service. Wenn Docker Compose, hier weiterleiten auf den eigentlichen Dienst in Compose.
|
||||||
* Cert-Dateinamen anpassen
|
* Cert-Dateinamen anpassen
|
||||||
* `playbooks/templates/chaosknoten/configs/`*host*`/compose.yaml.j2`: Config für Docker Compose (wenn verwendet)
|
* `playbooks/templates/chaosknoten/configs/`*host*`/compose.yaml.j2`: Config für Docker Compose (wenn verwendet)
|
||||||
|
|
||||||
**ACHTUNG** manchmal startet der nginx auf public-reverse-proxy nicht automatisch neu, wenn man etwas an der Config ändert (z. B. einen neuen Host einträgt). Dann muss man das mit `systemctl restart nginx` von Hand machen.
|
|
|
@ -26,6 +26,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
become: true
|
become: true
|
||||||
|
notify: Restart `nginx.service`
|
||||||
|
|
||||||
- name: handle the case, where no custom `nginx.conf` is to be used
|
- name: handle the case, where no custom `nginx.conf` is to be used
|
||||||
when: not nginx__use_custom_nginx_conf
|
when: not nginx__use_custom_nginx_conf
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
remote_src: true
|
remote_src: true
|
||||||
src: /etc/nginx/nginx.conf.ansiblesave
|
src: /etc/nginx/nginx.conf.ansiblesave
|
||||||
become: true
|
become: true
|
||||||
|
notify: Restart `nginx.service`
|
||||||
|
|
||||||
- name: delete the `nginx.conf.ansiblesave`, if it is present
|
- name: delete the `nginx.conf.ansiblesave`, if it is present
|
||||||
when: nginx__nginx_conf_ansiblesave_stat_result.stat.exists
|
when: nginx__nginx_conf_ansiblesave_stat_result.stat.exists
|
||||||
|
|
Loading…
Reference in a new issue