mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 10:19:09 +00:00 
			
		
		
		
	Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation
This commit is contained in:
		
							
								
								
									
										55
									
								
								roles/web-app-mailu/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								roles/web-app-mailu/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| --- | ||||
| - name: "Include service-rdbms-central" | ||||
|   include_role: | ||||
|     name: service-rdbms-central | ||||
|   when: run_once_docker_mailu is not defined | ||||
|  | ||||
| - name: "Include role webserver-proxy-domain for {{ application_id }}" | ||||
|   include_role: | ||||
|     name: webserver-proxy-domain | ||||
|   vars: | ||||
|     domain: "{{ domains | get_domain(application_id) }}" | ||||
|     http_port: "{{ ports.localhost.http[application_id] }}" | ||||
|     nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 31M;" | ||||
|   when: run_once_docker_mailu is not defined | ||||
|  | ||||
| - name: "Include the webserver-proxy-tls-deploy role" | ||||
|   include_role: | ||||
|     name: webserver-proxy-tls-deploy | ||||
|   when: run_once_docker_mailu is not defined | ||||
|  | ||||
| - name: Flush docker service handlers | ||||
|   meta: flush_handlers | ||||
|   when: run_once_docker_mailu is not defined | ||||
|  | ||||
| - name: "Create Mailu accounts" | ||||
|   include_tasks: create-mailu-user.yml | ||||
|   vars: | ||||
|     mailu_compose_dir:        "{{ docker_compose.directories.instance }}" | ||||
|     mailu_domain:             "{{ primary_domain }}" | ||||
|     mailu_api_base_url:       "http://127.0.0.1:8080/api/v1" | ||||
|     mailu_global_api_token:   "{{ applications.mailu.credentials.api_token }}" | ||||
|     mailu_action: >- | ||||
|       {{ | ||||
|         ( | ||||
|           'administrator' in (item.value.get('roles', [])) | ||||
|         ) | ||||
|         | ternary('admin','user') | ||||
|       }} | ||||
|     mailu_user_key:           "{{ item.key }}" | ||||
|     mailu_user_name:          "{{ item.value.username }}" | ||||
|     mailu_password:           "{{ item.value.password }}" | ||||
|     mailu_token_ip:           "{{ item.value.ip | default('') }}" | ||||
|   loop:                       "{{ users | dict2items }}" | ||||
|   loop_control: | ||||
|     loop_var: item | ||||
|   when: run_once_docker_mailu is not defined | ||||
|    | ||||
| - name: Set Mailu DNS records | ||||
|   include_tasks: set-mailu-dns-records.yml | ||||
|   when: dns_provider == 'cloudflare' | ||||
|  | ||||
| - name: Run the docker_mailu roles once | ||||
|   set_fact: | ||||
|     run_once_docker_mailu: true | ||||
|   when: run_once_docker_mailu is not defined | ||||
		Reference in New Issue
	
	Block a user