mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 02:10:05 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| ---
 | |
| - name: install nginx
 | |
|   pacman: name=nginx state=present
 | |
|   notify: restart nginx
 | |
|   when: run_once_nginx is not defined
 | |
| 
 | |
| # I assume the following can be deleted
 | |
| # @todo Delete
 | |
| 
 | |
| - name: install nginx-mod-headers-more for matomo
 | |
|   pacman: 
 | |
|     name: nginx-mod-headers-more
 | |
|     state: present
 | |
|   notify: restart nginx
 | |
|   when: run_once_nginx is not defined and global_matomo_tracking_enabled | bool
 | |
| 
 | |
| - name: "Delete {{nginx.directories.configuration}} directory, when mode_reset"
 | |
|   file:
 | |
|     path: "{{ nginx.directories.configuration }}"
 | |
|     state: absent
 | |
|   when: mode_reset and run_once_nginx is not defined
 | |
| 
 | |
| - name: Ensure nginx configuration directories are present
 | |
|   file:
 | |
|     path: "{{ item }}"
 | |
|     state: directory
 | |
|     mode: '0755'
 | |
|     recurse: yes
 | |
|   loop: "{{ nginx.directories.http.values() | list + [nginx.directories.streams] }}"
 | |
|   when: run_once_nginx is not defined
 | |
| 
 | |
| - name: create nginx config file
 | |
|   template: 
 | |
|     src:  nginx.conf.j2 
 | |
|     dest: /etc/nginx/nginx.conf
 | |
|   notify: restart nginx
 | |
|   when: run_once_nginx is not defined
 | |
| 
 | |
| - name: flush nginx service
 | |
|   meta: flush_handlers
 | |
|   when: run_once_nginx is not defined
 | |
| 
 | |
| - name: run the nginx tasks once
 | |
|   set_fact:
 | |
|     run_once_nginx: true
 | |
|   when: run_once_nginx is not defined
 |