mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-13 06:06:38 +00:00
58 lines
2.0 KiB
YAML
58 lines
2.0 KiB
YAML
- name: "load docker, db and proxy for {{ application_id }}"
|
|
include_role:
|
|
name: sys-stk-full
|
|
vars:
|
|
docker_compose_flush_handlers: false
|
|
application_id: web-app-nextcloud
|
|
# Necessary to save talk recordings
|
|
webserver_client_max_body_size: 10G
|
|
|
|
- when: NEXTCLOUD_WHITEBOARD_ENABLED | bool
|
|
block:
|
|
- name: "Create '{{ NEXTCLOUD_WHITEBOARD_SERVICE_DIRECTORY }}' Directory"
|
|
file:
|
|
path: "{{ NEXTCLOUD_WHITEBOARD_SERVICE_DIRECTORY }}"
|
|
state: directory
|
|
owner: "{{ NEXTCLOUD_DOCKER_USER_ID }}"
|
|
group: "{{ NEXTCLOUD_DOCKER_USER_ID }}"
|
|
mode: "0755"
|
|
|
|
- name: "Deploy Whiteboard Dockerfile to '{{ NEXTCLOUD_WHITEBOARD_SERVICE_DOCKERFILE }}'"
|
|
template:
|
|
src: "Dockerfiles/Whiteboard.j2"
|
|
dest: "{{ NEXTCLOUD_WHITEBOARD_SERVICE_DOCKERFILE }}"
|
|
notify: compose build
|
|
|
|
- name: "create {{ NEXTCLOUD_HOST_CONF_ADD_PATH }}"
|
|
file:
|
|
path: "{{ NEXTCLOUD_HOST_CONF_ADD_PATH }}"
|
|
state: directory
|
|
owner: "{{ NEXTCLOUD_DOCKER_USER_ID }}"
|
|
group: "{{ NEXTCLOUD_DOCKER_USER_ID }}"
|
|
mode: "0755"
|
|
|
|
- name: "Create config files at {{ NEXTCLOUD_HOST_CONF_ADD_PATH }}"
|
|
template:
|
|
src: "{{ item }}"
|
|
dest: "{{ NEXTCLOUD_HOST_CONF_ADD_PATH }}/{{ item | basename | regex_replace('\\.j2$', '') }}"
|
|
owner: "{{ NEXTCLOUD_DOCKER_USER_ID }}"
|
|
group: "{{ NEXTCLOUD_DOCKER_USER_ID }}"
|
|
mode: "0644"
|
|
loop: "{{ lookup('fileglob', role_path ~ '/templates/config/*.j2', wantlist=True) }}"
|
|
notify: compose up
|
|
|
|
- name: "NEXTCLOUD | Ensure host-mounted infinito config files ownership/permissions (recursive)"
|
|
ansible.builtin.file:
|
|
path: "{{ NEXTCLOUD_HOST_CONF_ADD_PATH }}"
|
|
state: directory
|
|
recurse: true
|
|
owner: "{{ NEXTCLOUD_DOCKER_USER_ID }}"
|
|
group: "{{ NEXTCLOUD_DOCKER_USER_ID }}"
|
|
mode: "u=rwX,g=rX,o=rX"
|
|
|
|
- name: create internal nextcloud nginx configuration
|
|
template:
|
|
src: "docker.conf.j2"
|
|
dest: "{{ NEXTCLOUD_HOST_NGINX_PATH }}"
|
|
notify: compose up
|