mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-03-31 14:24:16 +02:00
66 lines
2.5 KiB
YAML
66 lines
2.5 KiB
YAML
---
|
|
- name: "include docker-central-database"
|
|
include_role:
|
|
name: docker-central-database
|
|
|
|
- name: copy oidc.config.php
|
|
template:
|
|
src: oidc.config.php.j2
|
|
dest: "{{nextcloud_host_oidc_login_path}}"
|
|
owner: 82 # User www-data in Nextcloud container
|
|
group: 82 # User www-data in Nextcloud container
|
|
when: applications[application_id].oidc.flavor == "oidc_login"
|
|
|
|
- name: Remove OIDC configuration lines from config.php if present (container)
|
|
command: >
|
|
docker exec -u www-data {{ applications.nextcloud.container.application }} sh -c "sed -i '/CONFIG_EXTRA = include.*oidc\.config\.php/d' /var/www/html/config/config.php && sed -i '/CONFIG = array_merge(\\$CONFIG, \\$CONFIG_EXTRA)/d' /var/www/html/config/config.php"
|
|
when: applications[application_id].oidc.flavor == "sociallogin" and mode_cleanup | bool
|
|
|
|
- name: Set maintanance window
|
|
command: >
|
|
docker exec -u www-data {{ applications.nextcloud.container.application }} php occ config:system:set maintenance_window_start --type=integer --value={{on_calendar_nextcloud}}"
|
|
|
|
- name: "include role for {{application_id}} to recieve certs & do modification routines"
|
|
include_role:
|
|
name: nginx-https-get-cert-modify-all
|
|
|
|
- name: create nextcloud nginx proxy configuration file
|
|
template:
|
|
src: "proxy-nginx.conf.j2"
|
|
dest: "{{nginx.directories.http.servers}}{{domains[application_id]}}.conf"
|
|
notify: restart nginx
|
|
|
|
- name: create internal nextcloud nginx configuration
|
|
template:
|
|
src: "internal-nginx.conf.j2"
|
|
dest: "{{docker_compose.directories.volumes}}nginx.conf"
|
|
notify: restart docker nginx service
|
|
|
|
- name: "copy docker-compose.yml and env file"
|
|
include_tasks: copy-docker-compose-and-env.yml
|
|
|
|
- name: Flush all handlers immediately so that occ can be used
|
|
meta: flush_handlers
|
|
|
|
- name: Setup Nextcloud Plugins
|
|
include_tasks: plugin.yml
|
|
loop: "{{applications[application_id].plugins | dict2items }}"
|
|
loop_control:
|
|
loop_var: plugin_item
|
|
vars:
|
|
plugin_name: "{{ plugin_item.key }}"
|
|
plugin_configuration: "{{ plugin_item.value }}"
|
|
|
|
- name: "Include OIDC-specific tasks with flavor {{applications[application_id].oidc.flavor}}"
|
|
include_tasks: "{{applications[application_id].oidc.flavor}}.yml"
|
|
when: applications[application_id].oidc.enabled | bool
|
|
|
|
- name: Include LDAP specific tasks
|
|
include_tasks: ldap.yml
|
|
when: applications[application_id].ldap.enabled | bool
|
|
|
|
- name: Include Config specific tasks
|
|
include_tasks: config.yml
|
|
|
|
- name: De\Activate legacy login mask
|
|
include_tasks: legacy_login_mask.yml |