mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
Clean kiwix/tasks/apache.yml & kiwix/tasks/nginx.yml
This commit is contained in:
parent
6e22d73f70
commit
f17c5077dd
2 changed files with 12 additions and 15 deletions
|
@ -1,14 +1,12 @@
|
||||||
- name: Enable http://box{{ kiwix_url }} via Apache
|
- name: Enable http://box{{ kiwix_url }} via Apache # http://box/kiwix
|
||||||
command: a2ensite kiwix.conf
|
command: a2ensite kiwix.conf
|
||||||
when: apache_install and kiwix_enabled
|
when: kiwix_enabled | bool
|
||||||
|
|
||||||
- name: Disable http://box{{ kiwix_url }} via Apache
|
- name: Disable http://box{{ kiwix_url }} via Apache # http://box/kiwix
|
||||||
command: a2dissite kiwix.conf
|
command: a2dissite kiwix.conf
|
||||||
when: apache_install and not kiwix_enabled
|
when: not kiwix_enabled
|
||||||
|
|
||||||
- name: Restart Apache systemd service ({{ apache_service }})
|
- name: (Re)Start '{{ apache_service }}' systemd service
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ apache_service }}"
|
name: "{{ apache_service }}" # apache2 or httpd, as set in /opt/iiab/iiab/vars/<OS>.yml
|
||||||
daemon-reload: yes
|
|
||||||
state: restarted
|
state: restarted
|
||||||
when: apache_enabled | bool
|
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
- name: Enable http://box{{ kiwix_url }} via NGINX, by installing {{ nginx_conf_dir }}/kiwix-nginx.conf from template
|
- name: Enable http://box{{ kiwix_url }} via NGINX, by installing {{ nginx_conf_dir }}/kiwix-nginx.conf from template # http://box/kiwix
|
||||||
template:
|
template:
|
||||||
src: kiwix-nginx.conf.j2
|
src: kiwix-nginx.conf.j2
|
||||||
dest: "{{ nginx_conf_dir }}/kiwix-nginx.conf"
|
dest: "{{ nginx_conf_dir }}/kiwix-nginx.conf" # /etc/nginx/conf.d
|
||||||
when: nginx_install and kiwix_enabled
|
when: kiwix_enabled | bool
|
||||||
|
|
||||||
- name: Disable http://box{{ kiwix_url }} via NGINX, by removing {{ nginx_conf_dir }}/kiwix-nginx.conf
|
- name: Disable http://box{{ kiwix_url }} via NGINX, by removing {{ nginx_conf_dir }}/kiwix-nginx.conf # http://box/kiwix
|
||||||
file:
|
file:
|
||||||
path: "{{ nginx_conf_dir }}/kiwix-nginx.conf"
|
path: "{{ nginx_conf_dir }}/kiwix-nginx.conf" # /etc/nginx/conf.d
|
||||||
state: absent
|
state: absent
|
||||||
when: nginx_install and not kiwix_enabled
|
when: not kiwix_enabled
|
||||||
|
|
||||||
- name: Restart 'nginx' systemd service
|
- name: Restart 'nginx' systemd service
|
||||||
systemd:
|
systemd:
|
||||||
name: nginx
|
name: nginx
|
||||||
state: restarted
|
state: restarted
|
||||||
when: nginx_enabled | bool
|
|
||||||
|
|
Loading…
Reference in a new issue