mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	Update kiwix/tasks/enable.yml
This commit is contained in:
		
							parent
							
								
									3dc610d33f
								
							
						
					
					
						commit
						2a11796af0
					
				
					 1 changed files with 10 additions and 10 deletions
				
			
		|  | @ -36,37 +36,37 @@ | |||
| 
 | ||||
| # Apache | ||||
| 
 | ||||
| - name: Enable http://box/kiwix with Apache proxy | ||||
| - name: "Enable http://box{{ kiwix_url_without_slash }} via Apache" | ||||
|   command: a2ensite kiwix.conf | ||||
|   when: kiwix_enabled and not nginx_enabled | ||||
|   when: apache_install and kiwix_enabled | ||||
| 
 | ||||
| - name: Disable http://box/kiwix with Apache | ||||
|   command: a2dissite calibre-web.conf | ||||
|   when: not kiwix_enabled or nginx_enabled | ||||
| - name: "Disable http://box{{ kiwix_url_without_slash }} via Apache" | ||||
|   command: a2dissite kiwix.conf | ||||
|   when: apache_install and not kiwix_enabled | ||||
| 
 | ||||
| - name: Restart Apache systemd service ({{ apache_service }}) | ||||
|   systemd: | ||||
|     name: "{{ apache_service }}" | ||||
|     daemon-reload: yes | ||||
|     state: restarted | ||||
|   when: not nginx_enabled | ||||
|   when: apache_enabled | bool | ||||
| 
 | ||||
| # NGINX | ||||
| 
 | ||||
| - name: 'Install from template: {{ nginx_config_dir }}/kiwix-nginx.conf' | ||||
| - name: "Enable http://box{{ kiwix_url_without_slash }} via NGINX, by installing {{ nginx_config_dir }}/kiwix-nginx.conf from template" | ||||
|   template: | ||||
|     src: kiwix-nginx.conf | ||||
|     dest: "{{ nginx_config_dir }}/kiwix-nginx.conf" | ||||
|     owner: root    # Not nec? Remove? | ||||
|     group: root    # Not nec? Remove? | ||||
|     mode: '0644'    # Not nec? Remove? | ||||
|   when: kiwix_enabled and nginx_enabled | ||||
|   when: nginx_install and kiwix_enabled | ||||
| 
 | ||||
| - name: Remove {{ nginx_config_dir }}/kiwix-nginx.conf | ||||
| - name: "Disable http://box{{ kiwix_url_without_slash }} via NGINX, by removing {{ nginx_config_dir }}/kiwix-nginx.conf" | ||||
|   file: | ||||
|     path: "{{ nginx_config_dir }}/kiwix-nginx.conf" | ||||
|     state: absent | ||||
|   when: not kiwix_enabled or not nginx_enabled | ||||
|   when: nginx_install and not kiwix_enabled | ||||
| 
 | ||||
| - name: Restart nginx systemd service | ||||
|   systemd: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue