mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	kiwix - add when nginx_enabled - restart2
This commit is contained in:
		
							parent
							
								
									de5cdde3cc
								
							
						
					
					
						commit
						3e9ffb8987
					
				
					 3 changed files with 40 additions and 7 deletions
				
			
		| 
						 | 
					@ -104,7 +104,25 @@
 | 
				
			||||||
    src: /etc/apache2/sites-available/kiwix.conf
 | 
					    src: /etc/apache2/sites-available/kiwix.conf
 | 
				
			||||||
    path: /etc/apache2/sites-enabled/kiwix.conf
 | 
					    path: /etc/apache2/sites-enabled/kiwix.conf
 | 
				
			||||||
    state: link
 | 
					    state: link
 | 
				
			||||||
  when: is_debuntu | bool
 | 
					  when: kiwix_enabled | bool and not nginx_enabled | bool
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: Install nginx support
 | 
				
			||||||
 | 
					  template:
 | 
				
			||||||
 | 
					    backup: no
 | 
				
			||||||
 | 
					    src: "{{ item.src }}"
 | 
				
			||||||
 | 
					    dest: "{{ item.dest }}"
 | 
				
			||||||
 | 
					    owner: root
 | 
				
			||||||
 | 
					    group: root
 | 
				
			||||||
 | 
					    mode: "{{ item.mode }}"
 | 
				
			||||||
 | 
					  with_items:
 | 
				
			||||||
 | 
					    - { src: 'kiwix-nginx.conf', dest: '/etc/nginx/conf.d/kiwix-nginx.conf', mode: '0644' }
 | 
				
			||||||
 | 
					  when: kiwix_enabled | bool and nginx_enabled | bool
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: Remove symlink /etc/apache2/sites-enabled/kiwix.conf
 | 
				
			||||||
 | 
					  file:
 | 
				
			||||||
 | 
					    path: /etc/apache2/sites-enabled/kiwix.conf
 | 
				
			||||||
 | 
					    state: absent
 | 
				
			||||||
 | 
					  when: not kiwix_enabled | bool or nginx_enabled | bool
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Enable & Restart 'kiwix-serve' service
 | 
					- name: Enable & Restart 'kiwix-serve' service
 | 
				
			||||||
  systemd:
 | 
					  systemd:
 | 
				
			||||||
| 
						 | 
					@ -142,9 +160,22 @@
 | 
				
			||||||
  when: kiwix_enabled and is_redhat
 | 
					  when: kiwix_enabled and is_redhat
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Restart Apache, so it picks up kiwix.conf
 | 
					- name: Restart Apache, so it picks up kiwix.conf
 | 
				
			||||||
  service:
 | 
					  systemd:
 | 
				
			||||||
    name: "{{ apache_service }}"
 | 
					    name: "{{ apache_service }}"
 | 
				
			||||||
    state: restarted
 | 
					    state: restarted
 | 
				
			||||||
 | 
					  when: not nginx_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: Restart nginx, so it picks up kiwix-nginx.conf state
 | 
				
			||||||
 | 
					  systemd:
 | 
				
			||||||
 | 
					    name: nginx
 | 
				
			||||||
 | 
					    state: restarted
 | 
				
			||||||
 | 
					  when: nginx_enabled | bool
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 5. FINALIZE
 | 
					# 5. FINALIZE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,18 +5,20 @@
 | 
				
			||||||
    1. Principal functions migrated to nginx.
 | 
					    1. Principal functions migrated to nginx.
 | 
				
			||||||
         * Admin Console
 | 
					         * Admin Console
 | 
				
			||||||
         * Awstats
 | 
					         * Awstats
 | 
				
			||||||
         * kiwix -- goes directly to port 3000
 | 
					 | 
				
			||||||
         * kalite -- goes directly to port 8009
 | 
					         * kalite -- goes directly to port 8009
 | 
				
			||||||
         * calibre-web
 | 
					 | 
				
			||||||
         * kolibri
 | 
					 | 
				
			||||||
         * usb-lib
 | 
					         * usb-lib
 | 
				
			||||||
         * maps
 | 
					         * maps
 | 
				
			||||||
    2. Still proxied to Apache
 | 
					    2. Dual support
 | 
				
			||||||
 | 
					         * kiwix -- goes directly to port 3000
 | 
				
			||||||
 | 
					         * calibre-web
 | 
				
			||||||
 | 
					         * kolibri
 | 
				
			||||||
 | 
					         * sugarizer
 | 
				
			||||||
 | 
					    3. Still proxied to Apache
 | 
				
			||||||
         * mediawiki
 | 
					         * mediawiki
 | 
				
			||||||
         * elgg
 | 
					         * elgg
 | 
				
			||||||
         * nodered
 | 
					         * nodered
 | 
				
			||||||
         * nextcloud
 | 
					         * nextcloud
 | 
				
			||||||
         * wordpress
 | 
					         * wordpress
 | 
				
			||||||
         * moodle
 | 
					         * moodle
 | 
				
			||||||
    3. Not dealt with yet
 | 
					    4. Not dealt with yet
 | 
				
			||||||
         * archive.org
 | 
					         * archive.org
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue