mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 18:29:21 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| - name: Merge all files in infinito directory (container)
 | |
|   block:
 | |
|     - name: Add dynamic config merging from Jinja template
 | |
|       template:
 | |
|         src: include.php.j2
 | |
|         dest: "{{ nextcloud_host_include_instructions_file }}"
 | |
|       notify: docker compose restart
 | |
| 
 | |
|     - name: Flush handlers so Nextcloud container is restarted and ready
 | |
|       meta: flush_handlers
 | |
| 
 | |
|     - name: "Wait until Nextcloud is reachable on port {{ ports.localhost.http[application_id] }}"
 | |
|       wait_for:
 | |
|         host: 127.0.0.1
 | |
|         port: "{{ ports.localhost.http[application_id] }}"
 | |
|         timeout: 120
 | |
|         delay: 2
 | |
|         state: started
 | |
| 
 | |
|     - name: Copy include instructions to the container
 | |
|       command: >
 | |
|         docker cp {{ nextcloud_host_include_instructions_file }} {{ NEXTCLOUD_CONTAINER }}:{{ nextcloud_docker_include_instructions_file }}
 | |
| 
 | |
|     - name: Append generated config to config.php only if not present
 | |
|       command: >
 | |
|         docker exec -u {{ NEXTCLOUD_DOCKER_USER }} {{ NEXTCLOUD_CONTAINER }} sh -c "
 | |
|           grep -q '{{ nextcloud_docker_config_additives_directory }}' {{ nextcloud_docker_config_file }} || 
 | |
|           cat {{ nextcloud_docker_include_instructions_file }} >> {{ nextcloud_docker_config_file }}"
 | |
|       notify: docker compose restart
 |