mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	only_nginx
This commit is contained in:
		
							parent
							
								
									2b411efa3f
								
							
						
					
					
						commit
						90c0a3046a
					
				
					 1 changed files with 84 additions and 0 deletions
				
			
		
							
								
								
									
										84
									
								
								roles/nginx/tasks/only_nginx.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								roles/nginx/tasks/only_nginx.yml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,84 @@
 | 
				
			||||||
 | 
					- 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
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue