Konfiguration von media und meta als statische Sites.
This commit is contained in:
		
					parent
					
						
							
								3c917ce4b2
							
						
					
				
			
			
				commit
				
					
						b0d42a931d
					
				
			
		
					 6 changed files with 94 additions and 6 deletions
				
			
		
							
								
								
									
										39
									
								
								roles/web-server/static/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								roles/web-server/static/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,39 @@ | |||
| --- | ||||
| - name: configure static sites | ||||
|   template: > | ||||
|     backup=yes | ||||
|     src=site.j2 | ||||
|     dest="/etc/nginx/sites-available/{{ item[0] }}" | ||||
|     owner=root | ||||
|     group=root | ||||
|     mode=0644 | ||||
|   with_items: "{{ web.sites.static.items() }}" | ||||
|   notify: reload nginx config | ||||
|   tags: | ||||
|     - nginx | ||||
|     - website | ||||
|     - static | ||||
| 
 | ||||
| - name: create static site roots | ||||
|   file: path="{{ item.document_root.path }}" state=directory owner=www-data group=www-data mode=0755 | ||||
|   with_items: "{{ web.sites.static.values() }}" | ||||
|   when: item.document_root.create | ||||
|   tags: | ||||
|     - nginx | ||||
|     - website | ||||
|     - static | ||||
| 
 | ||||
| - name: enable static sites | ||||
|   file: > | ||||
|     src="/etc/nginx/sites-available/{{ item }}" | ||||
|     dest="/etc/nginx/sites-enabled/{{ item }}" | ||||
|     owner=root | ||||
|     group=root | ||||
|     mode=0644 | ||||
|     state=link | ||||
|   with_items: "{{ web.sites.static.keys() }}" | ||||
|   notify: reload nginx config | ||||
|   tags: | ||||
|     - nginx | ||||
|     - website | ||||
|     - static | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 baldo
				baldo