mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
85 lines
2.5 KiB
YAML
85 lines
2.5 KiB
YAML
|
- name: Remove symlink /etc/apache2/sites-enabled/kiwix.conf
|
||
|
file:
|
||
|
path: /etc/apache2/sites-enabled/kiwix.conf
|
||
|
state: absent
|
||
|
|
||
|
- name: Install nginx support for kiwix if kiwix_enabled
|
||
|
copy:
|
||
|
backup: no
|
||
|
src: "{{ item.src }}"
|
||
|
dest: "{{ item.dest }}"
|
||
|
mode: "{{ item.mode }}"
|
||
|
owner: root
|
||
|
group: root
|
||
|
with_items:
|
||
|
- { src: 'roles/kiwix/templates/kiwix-nginx.conf', dest: '/etc/nginx/conf.d/kiwix-nginx.conf' , mode: '0644' }
|
||
|
when: kiwix_enabled | bool
|
||
|
|
||
|
- name: Remove nginx support for kiwix
|
||
|
file:
|
||
|
path: /etc/nginx/conf.d/kiwix-nginx.conf
|
||
|
state: absent
|
||
|
when: not kiwix_enabled | bool
|
||
|
|
||
|
- name: Remove symlink /etc/apache2/sites-enabled/sugarizer.conf
|
||
|
file:
|
||
|
path: /etc/apache2/sites-enabled/sugarizer.conf
|
||
|
state: absent
|
||
|
|
||
|
- name: "Install sugarizer-nginx.conf (nginx) if sugarizer_enabled"
|
||
|
template:
|
||
|
src: "{{ item.src }}"
|
||
|
dest: "{{ item.dest }}"
|
||
|
mode: "{{ item.mode }}"
|
||
|
owner: root
|
||
|
group: root
|
||
|
with_items:
|
||
|
- { src: 'roles/sugarizer/templates/sugarizer-nginx.conf', dest: '/etc/nginx/conf.d/sugarizer-nginx.conf', mode: '0644' }
|
||
|
when: sugarizer_enabled | bool
|
||
|
|
||
|
- name: Remove nginx support for sugarizer
|
||
|
file:
|
||
|
path: /etc/nginx/conf.d/sugarizer-nginx.conf
|
||
|
when: not sugarizer_enabled | bool
|
||
|
|
||
|
- name: Remove /etc/apache2/sites-enabled/kolibri.conf
|
||
|
file:
|
||
|
path: /etc/apache2/sites-enabled/kolibri.conf
|
||
|
state: absent
|
||
|
|
||
|
- name: Supply /etc/nginx/conf.d/kolibri-nginx.conf when kolibri_enabled
|
||
|
template:
|
||
|
src: "{{ item.src }}"
|
||
|
dest: "{{ item.dest }}"
|
||
|
mode: "{{ item.mode }}"
|
||
|
owner: root
|
||
|
group: root
|
||
|
with_items:
|
||
|
- { src: 'roles/kolibri/templates/kolibri-nginx.conf.j2', dest: '/etc/nginx/conf.d/kolibri-nginx.conf', mode: '0644' }
|
||
|
when: kolibri_enabled | bool
|
||
|
|
||
|
- name: Remove nginx support for kolibri when not kolibri_enabled
|
||
|
file:
|
||
|
path: /etc/nginx/conf.d/kolibri-nginx.conf
|
||
|
when: not kolibri_enabled | bool
|
||
|
|
||
|
- name: Disable /etc/apache2/sites-enabled/calibre-web.conf
|
||
|
command: a2dissite calibre-web.conf
|
||
|
when: not calibreweb_enabled
|
||
|
|
||
|
- name: Install /etc/nginx/conf.d/calibre-web-nginx.conf
|
||
|
template:
|
||
|
src: "{{ item.src }}"
|
||
|
dest: "{{ item.dest }}"
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: "{{ item.mode }}"
|
||
|
with_items:
|
||
|
- { src: 'roles/calibre-web/templates/calibre-web-nginx.conf.j2', dest: '/etc/nginx/conf.d/calibre-web-nginx.conf', mode: '0644' }
|
||
|
when: calibreweb_enabled
|
||
|
|
||
|
- name: Remove nginx support for sugarizer
|
||
|
file:
|
||
|
path: /etc/nginx/conf.d/sugarizer-nginx.conf
|
||
|
when: not calibreweb_enabled | bool
|