Compare commits
	
		
			No commits in common. "feature/dict-vars-and-install-paths" and "master" have entirely different histories.
		
	
	
		
			feature/di
			...
			master
		
	
		
					 3 changed files with 19 additions and 22 deletions
				
			
		|  | @ -16,8 +16,7 @@ Role Variables | ||||||
| 
 | 
 | ||||||
| | Variable                        | Description                                                                                                                                                                                                  | Default                           | | | Variable                        | Description                                                                                                                                                                                                  | Default                           | | ||||||
| | ---------------------------     | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------                              | ------------------                | | | ---------------------------     | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------                              | ------------------                | | ||||||
| | cryptpad_install_user           | The user who is going to manage/run the Docker Compose services                                                                                                                                              | {{ ansible_user }}                | | | docker_user                     | The user who is going to manage/run the Docker Compose services                                                                                                                                              | deploy                            | | ||||||
| | cryptpad_install_path           | The location where the service should be deployed                                                                                                                                                            | /home/{{ cryptpad_install_user }} | |  | ||||||
| | cryptpad_virtual_host           | The virtual host that is e.g. used by Traefik, usually part of the public url                                                                                                                                | localhost                         | | | cryptpad_virtual_host           | The virtual host that is e.g. used by Traefik, usually part of the public url                                                                                                                                | localhost                         | | ||||||
| | cryptpad_safe_virtual_host      | See above, and: this additonal domain is used together with `cryptpad_virtual_host` for additional security and must not be the same! More docs are in the `config.js` template                              |                                   | | | cryptpad_safe_virtual_host      | See above, and: this additonal domain is used together with `cryptpad_virtual_host` for additional security and must not be the same! More docs are in the `config.js` template                              |                                   | | ||||||
| | cryptpad_http_unsafe_origin_url | The URL of the public entrypoint URL, e.g. `https://pad.example.tld`                                                                                                                                         | https:// + $cryptpad_virtual_host | | | cryptpad_http_unsafe_origin_url | The URL of the public entrypoint URL, e.g. `https://pad.example.tld`                                                                                                                                         | https:// + $cryptpad_virtual_host | | ||||||
|  |  | ||||||
|  | @ -1,7 +1,5 @@ | ||||||
| --- | --- | ||||||
| # defaults file for jotbe.cryptpad-docker | # defaults file for jotbe.cryptpad-docker | ||||||
| cryptpad_install_user: '{{ ansible_user }}' # This user must be present on the host |  | ||||||
| cryptpad_install_path: '/home/{{ cryptpad_install_user }}' |  | ||||||
| cryptpad_http_address: 127.0.0.1 | cryptpad_http_address: 127.0.0.1 | ||||||
| cryptpad_http_unsafe_origin_url: https://{{ cryptpad_virtual_host }} | cryptpad_http_unsafe_origin_url: https://{{ cryptpad_virtual_host }} | ||||||
| cryptpad_http_safe_origin_url: https://{{ cryptpad_safe_virtual_host }} | cryptpad_http_safe_origin_url: https://{{ cryptpad_safe_virtual_host }} | ||||||
|  |  | ||||||
|  | @ -2,21 +2,21 @@ | ||||||
| # tasks file for jotbe.cryptpad-docker | # tasks file for jotbe.cryptpad-docker | ||||||
| - name: Ensure Docker Compose project directory exists | - name: Ensure Docker Compose project directory exists | ||||||
|   file: |   file: | ||||||
|     path: "{{ cryptpad_install_path }}/cryptpad" |     path: /home/{{ docker_user }}/cryptpad | ||||||
|     state: directory |     state: directory | ||||||
|     owner: '{{ cryptpad_install_user }}' |     owner: '{{ docker_user }}' | ||||||
|     group: '{{ cryptpad_install_user }}' |     group: '{{ docker_user }}' | ||||||
| 
 | 
 | ||||||
| - name: Provide docker-compose.yml | - name: Provide docker-compose.yml | ||||||
|   template: |   template: | ||||||
|     src: templates/docker-compose.cryptpad.yml.j2 |     src: templates/docker-compose.cryptpad.yml.j2 | ||||||
|     dest: "{{ cryptpad_install_path }}/cryptpad/docker-compose.yml" |     dest: /home/{{ docker_user }}/cryptpad/docker-compose.yml | ||||||
|     owner: "{{ cryptpad_install_user }}" |     owner: "{{ docker_user }}" | ||||||
|     group: "{{ cryptpad_install_user }}" |     group: "{{ docker_user }}" | ||||||
|     mode: '0644' |     mode: '0644' | ||||||
| 
 | 
 | ||||||
| - name: Output docker-compose.yml | - name: Output docker-compose.yml | ||||||
|   shell: cat {{ cryptpad_install_path }}/cryptpad/docker-compose.yml |   shell: cat /home/{{ docker_user }}/cryptpad/docker-compose.yml | ||||||
|   register: output |   register: output | ||||||
| 
 | 
 | ||||||
| - debug: | - debug: | ||||||
|  | @ -24,9 +24,9 @@ | ||||||
| 
 | 
 | ||||||
| - name: Provide env vars | - name: Provide env vars | ||||||
|   copy: |   copy: | ||||||
|     dest: "{{ cryptpad_install_path }}/cryptpad/.env" |     dest: /home/{{ docker_user }}/cryptpad/.env | ||||||
|     owner: "{{ cryptpad_install_user }}" |     owner: "{{ docker_user }}" | ||||||
|     group: "{{ cryptpad_install_user }}" |     group: "{{ docker_user }}" | ||||||
|     mode: '0640' |     mode: '0640' | ||||||
|     content: | |     content: | | ||||||
|       VERSION=v3.24.0 |       VERSION=v3.24.0 | ||||||
|  | @ -36,28 +36,28 @@ | ||||||
| 
 | 
 | ||||||
| - name: Ensure cryptpad config directory exists | - name: Ensure cryptpad config directory exists | ||||||
|   file: |   file: | ||||||
|     path: "{{ cryptpad_install_path }}/cryptpad/data/config" |     path: /home/{{ docker_user }}/cryptpad/data/config | ||||||
|     state: directory |     state: directory | ||||||
|     owner: '{{ cryptpad_install_user }}' |     owner: '{{ docker_user }}' | ||||||
|     group: '{{ cryptpad_install_user }}' |     group: '{{ docker_user }}' | ||||||
| 
 | 
 | ||||||
| - name: Provide cryptpad config | - name: Provide cryptpad config | ||||||
|   template: |   template: | ||||||
|     src: templates/config.js.j2 |     src: templates/config.js.j2 | ||||||
|     dest: "{{ cryptpad_install_path }}/cryptpad/data/config/config.js" |     dest: /home/{{ docker_user }}/cryptpad/data/config/config.js | ||||||
|     owner: "{{ cryptpad_install_user }}" |     owner: "{{ docker_user }}" | ||||||
|     group: "{{ cryptpad_install_user }}" |     group: "{{ docker_user }}" | ||||||
|     mode: '0644' |     mode: '0644' | ||||||
| 
 | 
 | ||||||
| - name: "docker-compose: Teardown existing cryptpad service" | - name: "docker-compose: Teardown existing cryptpad service" | ||||||
|   docker_compose: |   docker_compose: | ||||||
|     project_src: "{{ cryptpad_install_path }}/cryptpad/" |     project_src: "/home/{{ docker_user }}/cryptpad/" | ||||||
|     state: absent |     state: absent | ||||||
|   tags: ['never', 'teardown'] |   tags: ['never', 'teardown'] | ||||||
| 
 | 
 | ||||||
| - name: "docker-compose: Start cryptpad service" | - name: "docker-compose: Start cryptpad service" | ||||||
|   docker_compose: |   docker_compose: | ||||||
|     project_src: "{{ cryptpad_install_path }}/cryptpad/" |     project_src: "/home/{{ docker_user }}/cryptpad/" | ||||||
|     pull: yes |     pull: yes | ||||||
|   register: output |   register: output | ||||||
|   tags: service_start |   tags: service_start | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue