mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
gitea - softcode nginx_config_dir, adjust restart for nginx
This commit is contained in:
parent
adde3b9369
commit
4cafb59538
1 changed files with 5 additions and 7 deletions
|
@ -26,7 +26,7 @@
|
||||||
src: /etc/{{ apache_config_dir }}/gitea.conf
|
src: /etc/{{ apache_config_dir }}/gitea.conf
|
||||||
dest: /etc/apache2/sites-enabled/gitea.conf
|
dest: /etc/apache2/sites-enabled/gitea.conf
|
||||||
state: link
|
state: link
|
||||||
when: gitea_enabled and is_debuntu
|
when: gitea_enabled and not nginx_enabled
|
||||||
|
|
||||||
- name: Remove apache httpd conf file (OS's other than debuntu)
|
- name: Remove apache httpd conf file (OS's other than debuntu)
|
||||||
file:
|
file:
|
||||||
|
@ -36,21 +36,19 @@
|
||||||
|
|
||||||
- name: Remove nginx httpd conf file
|
- name: Remove nginx httpd conf file
|
||||||
file:
|
file:
|
||||||
path: /etc/nginx/conf.d/gitea-nginx.conf
|
path: "{{ nginx_config_dir }}/gitea-nginx.conf"
|
||||||
state: absent
|
state: absent
|
||||||
when: not gitea_enabled
|
when: not gitea_enabled
|
||||||
|
|
||||||
- name: Enable nginx httpd conf file
|
- name: Enable nginx httpd conf file
|
||||||
template:
|
template:
|
||||||
src: gitea-nginx.conf.j2
|
src: gitea-nginx.conf.j2
|
||||||
dest: /etc/nginx/conf.d/gitea-nginx.conf
|
dest: "{{ nginx_config_dir }}/gitea-nginx.conf"
|
||||||
when: gitea_enabled and nginx_enabled
|
when: gitea_enabled and nginx_enabled
|
||||||
|
|
||||||
- name: >-
|
- name: Restart nginx
|
||||||
Restart Apache ({{ apache_service }}) to {% if gitea_enabled %}enable{%
|
|
||||||
else %}disable{% endif %} http://box/gitea
|
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ apache_service }}"
|
name: nginx
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue