mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +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
|
||||
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
|
||||
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:
|
||||
name: "{{ apache_service }}"
|
||||
daemon-reload: yes
|
||||
name: "{{ apache_service }}" # apache2 or httpd, as set in /opt/iiab/iiab/vars/<OS>.yml
|
||||
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:
|
||||
src: kiwix-nginx.conf.j2
|
||||
dest: "{{ nginx_conf_dir }}/kiwix-nginx.conf"
|
||||
when: nginx_install and kiwix_enabled
|
||||
dest: "{{ nginx_conf_dir }}/kiwix-nginx.conf" # /etc/nginx/conf.d
|
||||
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:
|
||||
path: "{{ nginx_conf_dir }}/kiwix-nginx.conf"
|
||||
path: "{{ nginx_conf_dir }}/kiwix-nginx.conf" # /etc/nginx/conf.d
|
||||
state: absent
|
||||
when: nginx_install and not kiwix_enabled
|
||||
when: not kiwix_enabled
|
||||
|
||||
- name: Restart 'nginx' systemd service
|
||||
systemd:
|
||||
name: nginx
|
||||
state: restarted
|
||||
when: nginx_enabled | bool
|
||||
|
|
Loading…
Reference in a new issue