mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 07:18:09 +02:00
Restructure and cleaned up in preparation of new backup logic
This commit is contained in:
@@ -8,11 +8,11 @@
|
||||
|
||||
- name: Copy include instructions to the container
|
||||
command: >
|
||||
docker cp {{ nextcloud_host_include_instructions_file }} {{ applications.nextcloud.container.application }}:{{nextcloud_docker_include_instructions_file}}
|
||||
docker cp {{ nextcloud_host_include_instructions_file }} {{ nextcloud_name }}:{{nextcloud_docker_include_instructions_file}}
|
||||
|
||||
- name: Append generated config to config.php only if not present
|
||||
command: >
|
||||
docker exec -u {{nextcloud_docker_user}} {{ applications.nextcloud.container.application }} sh -c "
|
||||
docker exec -u {{nextcloud_docker_user}} {{ nextcloud_name }} 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
|
@@ -32,7 +32,7 @@
|
||||
- name: create internal nextcloud nginx configuration
|
||||
template:
|
||||
src: "nginx/docker.conf.j2"
|
||||
dest: "{{docker_compose.directories.volumes}}nginx.conf"
|
||||
dest: "{{ docker_compose.directories.volumes }}nginx.conf"
|
||||
notify: restart nextcloud nginx service
|
||||
|
||||
- name: Setup config.php
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
- name: Setup Nextcloud Plugins
|
||||
include_tasks: 02_plugin.yml
|
||||
loop: "{{applications | get_app_conf(application_id, 'plugins', True) | dict2items }}"
|
||||
loop: "{{ applications | get_app_conf(application_id, 'plugins', True) | dict2items }}"
|
||||
loop_control:
|
||||
loop_var: plugin_item
|
||||
vars:
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
- name: Add missing database indices in Nextcloud
|
||||
command: >
|
||||
{{nextcloud_docker_exec_occ}} db:add-missing-indices
|
||||
{{ nextcloud_docker_exec_occ }} db:add-missing-indices
|
||||
register: db_indices_result
|
||||
changed_when: >
|
||||
'Adding additional' in db_indices_result.stdout or
|
||||
@@ -65,8 +65,8 @@
|
||||
|
||||
- name: Ensure Nextcloud administrator is in the 'admin' group
|
||||
command: >
|
||||
docker exec -u {{ nextcloud_docker_user }} {{ applications.nextcloud.container.application }}
|
||||
php occ group:adduser admin {{ applications.nextcloud.users.administrator.username }}
|
||||
docker exec -u {{ nextcloud_docker_user }} {{ nextcloud_name }}
|
||||
php occ group:adduser admin {{ nextcloud_administrator_username }}
|
||||
register: add_admin_to_group
|
||||
changed_when: "'Added user' in add_admin_to_group.stdout"
|
||||
failed_when: add_admin_to_group.rc != 0 and "'is already a member of' not in add_admin_to_group.stderr"
|
||||
|
Reference in New Issue
Block a user