Compare commits

...

7 Commits

73 changed files with 116 additions and 103 deletions

View File

@@ -15,7 +15,7 @@ Every business is unique, and so is CyMaIS! With a modular architecture, it adap
With automated updates, system health checks, and security audits, CyMaIS ensures your infrastructure is always up-to-date and running smoothly. Roles such as `sys-hlth-docker-container`, `sys-hlth-btrfs`, and `sys-hlth-webserver` help monitor system integrity. With automated updates, system health checks, and security audits, CyMaIS ensures your infrastructure is always up-to-date and running smoothly. Roles such as `sys-hlth-docker-container`, `sys-hlth-btrfs`, and `sys-hlth-webserver` help monitor system integrity.
## Uncompromised Security 🔒 ## Uncompromised Security 🔒
Security is a top priority! CyMaIS includes robust security features like full-disk encryption recommendations, 2FA enforcement, encrypted server deployments (`web-app-keycloak`, `svc-db-openldap`), and secure backup solutions (`sys-bkp-remote-to-local`, `svc-sys-bkp-data-to-usb`). Security is a top priority! CyMaIS includes robust security features like full-disk encryption recommendations, 2FA enforcement, encrypted server deployments (`web-app-keycloak`, `svc-db-openldap`), and secure backup solutions (`sys-bkp-remote-to-local`, `svc-bkp-loc-2-usb`).
## User-Friendly with Expert Support 👩‍💻 ## User-Friendly with Expert Support 👩‍💻
No need to be a Linux or Docker expert! CyMaIS simplifies deployment with intuitive role-based automation. Documentation and community support make IT administration accessible to all experience levels. No need to be a Linux or Docker expert! CyMaIS simplifies deployment with intuitive role-based automation. Documentation and community support make IT administration accessible to all experience levels.

View File

@@ -10,7 +10,7 @@ Follow these guides to install and configure CyMaIS:
## Key Responsibilities 🔧 ## Key Responsibilities 🔧
- **User Management** - Configure LDAP, Keycloak, and user permissions. - **User Management** - Configure LDAP, Keycloak, and user permissions.
- **Security & Backups** - Set up `sys-bkp-remote-to-local`, `svc-sys-bkp-data-to-usb`, and `core-security` roles. - **Security & Backups** - Set up `sys-bkp-remote-to-local`, `svc-bkp-loc-2-usb`, and `core-security` roles.
- **Application Hosting** - Deploy services like `Nextcloud`, `Matrix`, `Gitea`, and more. - **Application Hosting** - Deploy services like `Nextcloud`, `Matrix`, `Gitea`, and more.
- **Networking & VPN** - Configure `WireGuard`, `OpenVPN`, and `Nginx Reverse Proxy`. - **Networking & VPN** - Configure `WireGuard`, `OpenVPN`, and `Nginx Reverse Proxy`.

View File

@@ -13,10 +13,10 @@ system_maintenance_lock_timeout_restart_docker: "{{system_maintenance_lock_ti
### Defined Services for Backup Tasks ### Defined Services for Backup Tasks
system_maintenance_backup_services: system_maintenance_backup_services:
- "sys-bkp-docker-to-local" - "sys-bkp-docker-2-loc"
- "svc-sys-bkp-rmt-2-loc" - "svc-bkp-rmt-2-loc"
- "svc-sys-bkp-data-to-usb" - "svc-bkp-loc-2-usb"
- "sys-bkp-docker-to-local-everything" - "sys-bkp-docker-2-loc-everything"
### Defined Services for System Cleanup ### Defined Services for System Cleanup
system_maintenance_cleanup_services: system_maintenance_cleanup_services:

View File

@@ -15,4 +15,4 @@
when: applications | get_app_conf(application_id, 'features.central_database', False) when: applications | get_app_conf(application_id, 'features.central_database', False)
- name: "For '{{ application_id }}': Add Entry for Backup Procedure" - name: "For '{{ application_id }}': Add Entry for Backup Procedure"
include_tasks: "{{ playbook_dir }}/roles/sys-bkp-docker-to-local/tasks/seed-database-to-backup.yml" include_tasks: "{{ playbook_dir }}/roles/sys-bkp-docker-2-loc/tasks/seed-database-to-backup.yml"

View File

@@ -1,3 +1,3 @@
user_home_directory: /home/{{users.client.username}}/ user_home_directory: /home/{{users.client.username}}/
cloud_directory: '{{user_home_directory}}Clouds/{{cloud_fqdn}}/{{users.client.username}}/' cloud_directory: '{{user_home_directory}}Clouds/{{cloud_fqdn}}/{{users.client.username}}/'
application_id: desk-nextcloud-client application_id: desk-nextcloud

View File

@@ -11,7 +11,8 @@ networks:
%} %}
svc-db-openldap: svc-db-openldap:
external: true external: true
{% else %} {% endif %}
{% if application_id != 'svc-db-openldap' %}
default: default:
{% if {% if
application_id in networks.local and application_id in networks.local and

View File

@@ -27,7 +27,7 @@ galaxy_info:
documentation: "https://s.veen.world/cymais/docker" documentation: "https://s.veen.world/cymais/docker"
dependencies: dependencies:
- sys-bkp-docker-to-local - sys-bkp-docker-2-loc
- user-administrator - user-administrator
- sys-hlth-docker-container - sys-hlth-docker-container
- sys-hlth-docker-volumes - sys-hlth-docker-volumes

View File

@@ -1 +1 @@
application_id: epson-multiprinter application_id: drv-epson-multiprinter

View File

@@ -1 +1 @@
application_id: intel application_id: drv-intel

View File

@@ -1 +1 @@
application_id: lid-switch application_id: drv-lid-switch

View File

@@ -1 +1 @@
application_id: msi-keyboard-color application_id: drv-msi-keyboard-color

View File

@@ -1 +1 @@
application_id: non-free application_id: drv-non-free

View File

@@ -21,7 +21,7 @@ def main():
machine_id = subprocess.run(["sha256sum", "/etc/machine-id"], capture_output=True, text=True).stdout.strip()[:64] machine_id = subprocess.run(["sha256sum", "/etc/machine-id"], capture_output=True, text=True).stdout.strip()[:64]
print(f"machine id: {machine_id}") print(f"machine id: {machine_id}")
versions_path = os.path.join(backup_to_usb_destination_path, f"{machine_id}/svc-sys-bkp-data-to-usb/") versions_path = os.path.join(backup_to_usb_destination_path, f"{machine_id}/svc-bkp-loc-2-usb/")
print(f"versions path: {versions_path}") print(f"versions path: {versions_path}")
if not os.path.isdir(versions_path): if not os.path.isdir(versions_path):

View File

@@ -0,0 +1,5 @@
- name: "reload svc-bkp-loc-2-usb.cymais.service"
systemd:
name: svc-bkp-loc-2-usb.cymais.service
state: reloaded
daemon_reload: yes

View File

@@ -1,6 +1,6 @@
- name: Copy backup script to the scripts directory - name: Copy backup script to the scripts directory
copy: copy:
src: svc-sys-bkp-data-to-usb.python src: svc-bkp-loc-2-usb.python
dest: "{{ backup_to_usb_script_path }}" dest: "{{ backup_to_usb_script_path }}"
owner: root owner: root
group: root group: root
@@ -8,9 +8,9 @@
- name: Copy systemd service to systemd directory - name: Copy systemd service to systemd directory
template: template:
src: svc-sys-bkp-data-to-usb.service.j2 src: svc-bkp-loc-2-usb.service.j2
dest: /etc/systemd/system/svc-sys-bkp-data-to-usb.cymais.service dest: /etc/systemd/system/svc-bkp-loc-2-usb.cymais.service
owner: root owner: root
group: root group: root
mode: '0644' mode: '0644'
notify: reload svc-sys-bkp-data-to-usb.cymais.service notify: reload svc-bkp-loc-2-usb.cymais.service

View File

@@ -1,6 +1,6 @@
backup_to_usb_script_path: /usr/local/sbin/svc-sys-bkp-data-to-usb.python backup_to_usb_script_path: /usr/local/sbin/svc-bkp-loc-2-usb.python
backup_to_usb_destination: '{{backup_to_usb_mount}}{{backup_to_usb_destination_subdirectory}}' backup_to_usb_destination: '{{backup_to_usb_mount}}{{backup_to_usb_destination_subdirectory}}'
backups_folder_path: '{{backup_to_usb_destination}}' backups_folder_path: '{{backup_to_usb_destination}}'
systemctl_mount_service_name: '{{ backup_to_usb_mount | trim(''/'') | replace(''/'', systemctl_mount_service_name: '{{ backup_to_usb_mount | trim(''/'') | replace(''/'',
''-'') }}.mount' ''-'') }}.mount'
application_id: svc-sys-bkp-data-to-usb application_id: svc-bkp-loc-2-usb

View File

@@ -0,0 +1,4 @@
- name: "reload svc-bkp-rmt-2-loc service"
systemd:
name: svc-bkp-rmt-2-loc.cymais.service
daemon_reload: yes

View File

@@ -4,17 +4,17 @@
state: directory state: directory
mode: 0755 mode: 0755
- name: create svc-sys-bkp-rmt-2-loc.sh - name: create svc-bkp-rmt-2-loc.sh
copy: copy:
src: svc-sys-bkp-rmt-2-loc.sh src: svc-bkp-rmt-2-loc.sh
dest: "{{docker_backup_remote_to_local_folder}}svc-sys-bkp-rmt-2-loc.sh" dest: "{{docker_backup_remote_to_local_folder}}svc-bkp-rmt-2-loc.sh"
mode: 0755 mode: 0755
- name: create svc-sys-bkp-rmt-2-loc.cymais.service - name: create svc-bkp-rmt-2-loc.cymais.service
template: template:
src: svc-sys-bkp-rmt-2-loc.service.j2 src: svc-bkp-rmt-2-loc.service.j2
dest: /etc/systemd/system/svc-sys-bkp-rmt-2-loc.cymais.service dest: /etc/systemd/system/svc-bkp-rmt-2-loc.cymais.service
notify: reload svc-sys-bkp-rmt-2-loc service notify: reload svc-bkp-rmt-2-loc service
- name: create backups-remote-to-local.sh - name: create backups-remote-to-local.sh
template: template:

View File

@@ -3,6 +3,6 @@
hosts="{{ pull_remote_backups | join(' ') }}"; hosts="{{ pull_remote_backups | join(' ') }}";
errors=0 errors=0
for host in $hosts; do for host in $hosts; do
bash {{ docker_backup_remote_to_local_folder }}svc-sys-bkp-rmt-2-loc.sh $host || ((errors+=1)); bash {{ docker_backup_remote_to_local_folder }}svc-bkp-rmt-2-loc.sh $host || ((errors+=1));
done; done;
exit $errors; exit $errors;

View File

@@ -0,0 +1,2 @@
docker_backup_remote_to_local_folder: '{{path_administrator_scripts}}svc-bkp-rmt-2-loc/'
application_id: svc-bkp-rmt-2-loc

View File

@@ -4,5 +4,5 @@ OnFailure=sys-alm-compose.cymais@%n.service
[Service] [Service]
Type=oneshot Type=oneshot
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore svc-opt-ssd-hdd svc-sys-bkp-rmt-2-loc --timeout "{{system_maintenance_lock_timeout_storage_optimizer}}"' ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore svc-opt-ssd-hdd svc-bkp-rmt-2-loc --timeout "{{system_maintenance_lock_timeout_storage_optimizer}}"'
ExecStart=/bin/sh -c '/usr/bin/python {{storage_optimizer_script}} --rapid-storage-path {{path_rapid_storage}} --mass-storage-path {{path_mass_storage}}' ExecStart=/bin/sh -c '/usr/bin/python {{storage_optimizer_script}} --rapid-storage-path {{path_rapid_storage}} --mass-storage-path {{path_mass_storage}}'

View File

@@ -1,4 +1,4 @@
# System Swapfile Role # System Swapfile
## Description ## Description

View File

@@ -0,0 +1 @@
application_id: svc-opt-swapfile

View File

@@ -1,5 +0,0 @@
- name: "reload svc-sys-bkp-data-to-usb.cymais.service"
systemd:
name: svc-sys-bkp-data-to-usb.cymais.service
state: reloaded
daemon_reload: yes

View File

@@ -1,4 +0,0 @@
- name: "reload svc-sys-bkp-rmt-2-loc service"
systemd:
name: svc-sys-bkp-rmt-2-loc.cymais.service
daemon_reload: yes

View File

@@ -1,2 +0,0 @@
docker_backup_remote_to_local_folder: '{{path_administrator_scripts}}svc-sys-bkp-rmt-2-loc/'
application_id: svc-sys-bkp-rmt-2-loc

View File

@@ -2,7 +2,7 @@
## Description ## Description
This Ansible role installs the [directory-validator](https://github.com/kevinveenbirkenbach/directory-validator.git). It is used by the sys-bkp-docker-to-local and sys-cln-faild-bkps roles to verify whether backups have been successfully created. This Ansible role installs the [directory-validator](https://github.com/kevinveenbirkenbach/directory-validator.git). It is used by the sys-bkp-docker-2-loc and sys-cln-faild-bkps roles to verify whether backups have been successfully created.
## Overview ## Overview

View File

@@ -2,7 +2,7 @@
## Description ## Description
This Ansible role automates the process of backing up Docker volumes to a local folder. It pulls the [sys-bkp-docker-to-local repository](https://github.com/kevinveenbirkenbach/sys-bkp-docker-to-local.git), installs required software, configures systemd services for both standard and "everything" backup modes, and seeds backup database entries as needed. This Ansible role automates the process of backing up Docker volumes to a local folder. It pulls the [sys-bkp-docker-2-loc repository](https://github.com/kevinveenbirkenbach/sys-bkp-docker-2-loc.git), installs required software, configures systemd services for both standard and "everything" backup modes, and seeds backup database entries as needed.
## Overview ## Overview
@@ -20,7 +20,7 @@ Backup Docker Volumes to Local is a comprehensive solution that leverages rsync
## Features ## Features
- **Required Software Installation:** Installs necessary packages (e.g., lsof, python-pandas) via pacman. - **Required Software Installation:** Installs necessary packages (e.g., lsof, python-pandas) via pacman.
- **Git Repository Pull:** Automatically pulls the latest version of the [sys-bkp-docker-to-local repository](https://github.com/kevinveenbirkenbach/sys-bkp-docker-to-local.git). - **Git Repository Pull:** Automatically pulls the latest version of the [sys-bkp-docker-2-loc repository](https://github.com/kevinveenbirkenbach/sys-bkp-docker-2-loc.git).
- **Systemd Service Configuration:** Deploys and reloads two systemd service templates to manage backup tasks. - **Systemd Service Configuration:** Deploys and reloads two systemd service templates to manage backup tasks.
- **Database Seeding:** Includes tasks to seed and manage a backup database (`databases.csv`) for tracking backup details. - **Database Seeding:** Includes tasks to seed and manage a backup database (`databases.csv`) for tracking backup details.
- **Dependency Integration:** Works in conjunction with the dependent roles listed above to verify and manage backups. - **Dependency Integration:** Works in conjunction with the dependent roles listed above to verify and manage backups.

View File

@@ -0,0 +1,9 @@
- name: "reload sys-bkp-docker-2-loc-everything.cymais.service"
systemd:
name: sys-bkp-docker-2-loc-everything.cymais.service
daemon_reload: yes
- name: "reload sys-bkp-docker-2-loc.cymais.service"
systemd:
name: sys-bkp-docker-2-loc.cymais.service
daemon_reload: yes

View File

@@ -21,18 +21,18 @@
include_tasks: reset.yml include_tasks: reset.yml
when: mode_reset | bool and run_once_bkp_docker_to_local is not defined when: mode_reset | bool and run_once_bkp_docker_to_local is not defined
- name: configure sys-bkp-docker-to-local-everything.cymais.service - name: configure sys-bkp-docker-2-loc-everything.cymais.service
template: template:
src: sys-bkp-docker-to-local-everything.service.j2 src: sys-bkp-docker-2-loc-everything.service.j2
dest: /etc/systemd/system/sys-bkp-docker-to-local-everything.cymais.service dest: /etc/systemd/system/sys-bkp-docker-2-loc-everything.cymais.service
notify: reload sys-bkp-docker-to-local-everything.cymais.service notify: reload sys-bkp-docker-2-loc-everything.cymais.service
when: run_once_bkp_docker_to_local is not defined when: run_once_bkp_docker_to_local is not defined
- name: configure sys-bkp-docker-to-local.cymais.service - name: configure sys-bkp-docker-2-loc.cymais.service
template: template:
src: sys-bkp-docker-to-local.service.j2 src: sys-bkp-docker-2-loc.service.j2
dest: /etc/systemd/system/sys-bkp-docker-to-local.cymais.service dest: /etc/systemd/system/sys-bkp-docker-2-loc.cymais.service
notify: reload sys-bkp-docker-to-local.cymais.service notify: reload sys-bkp-docker-2-loc.cymais.service
when: run_once_bkp_docker_to_local is not defined when: run_once_bkp_docker_to_local is not defined
- name: "set 'service_name' to '{{ role_name }}'" - name: "set 'service_name' to '{{ role_name }}'"

View File

@@ -4,6 +4,6 @@ OnFailure=sys-alm-compose.cymais@%n.service sys-cln-faild-bkps.cymais.service
[Service] [Service]
Type=oneshot Type=oneshot
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{ system_maintenance_backup_services | reject('equalto', 'sys-bkp-docker-to-local') | join(' ') }} --timeout "{{system_maintenance_lock_timeout_backup_services}}"' ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{ system_maintenance_backup_services | reject('equalto', 'sys-bkp-docker-2-loc') | join(' ') }} --timeout "{{system_maintenance_lock_timeout_backup_services}}"'
ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py --compose-dir {{path_docker_compose_instances}} --everything' ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py --compose-dir {{path_docker_compose_instances}} --everything'
ExecStartPost=/bin/sh -c '/bin/systemctl start sys-rpr-docker-soft.cymais.service &' ExecStartPost=/bin/sh -c '/bin/systemctl start sys-rpr-docker-soft.cymais.service &'

View File

@@ -4,6 +4,6 @@ OnFailure=sys-alm-compose.cymais@%n.service sys-cln-faild-bkps.cymais.service
[Service] [Service]
Type=oneshot Type=oneshot
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{ system_maintenance_backup_services | reject('equalto', 'sys-bkp-docker-to-local-everything') | join(' ') }} --timeout "{{system_maintenance_lock_timeout_backup_services}}"' ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{ system_maintenance_backup_services | reject('equalto', 'sys-bkp-docker-2-loc-everything') | join(' ') }} --timeout "{{system_maintenance_lock_timeout_backup_services}}"'
ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py --compose-dir {{path_docker_compose_instances}}' ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py --compose-dir {{path_docker_compose_instances}}'
ExecStartPost=/bin/sh -c '/bin/systemctl start sys-rpr-docker-soft.cymais.service &' ExecStartPost=/bin/sh -c '/bin/systemctl start sys-rpr-docker-soft.cymais.service &'

View File

@@ -1,9 +0,0 @@
- name: "reload sys-bkp-docker-to-local-everything.cymais.service"
systemd:
name: sys-bkp-docker-to-local-everything.cymais.service
daemon_reload: yes
- name: "reload sys-bkp-docker-to-local.cymais.service"
systemd:
name: sys-bkp-docker-to-local.cymais.service
daemon_reload: yes

View File

@@ -12,8 +12,8 @@ hashed_machine_id="$($get_hashed_machine_id | head -c 64)"
get_backup_types="find /Backups/$hashed_machine_id/ -maxdepth 1 -type d -execdir basename {} ;"; get_backup_types="find /Backups/$hashed_machine_id/ -maxdepth 1 -type d -execdir basename {} ;";
# @todo This configuration is not scalable yet. If other backup services then sys-bkp-docker-to-local are integrated, this logic needs to be optimized # @todo This configuration is not scalable yet. If other backup services then sys-bkp-docker-2-loc are integrated, this logic needs to be optimized
get_version_directories="ls -d /Backups/$hashed_machine_id/sys-bkp-docker-to-local/*" get_version_directories="ls -d /Backups/$hashed_machine_id/sys-bkp-docker-2-loc/*"
last_version_directory="$($get_version_directories | tail -1)" last_version_directory="$($get_version_directories | tail -1)"
rsync_command="sudo rsync --server --sender -blogDtpre.iLsfxCIvu . $last_version_directory/" rsync_command="sudo rsync --server --sender -blogDtpre.iLsfxCIvu . $last_version_directory/"

View File

@@ -40,7 +40,7 @@ def main(base_directory):
while blocker_running: while blocker_running:
try: try:
bash("systemctl is-active --quiet sys-bkp-docker-to-local.cymais.service") bash("systemctl is-active --quiet sys-bkp-docker-2-loc.cymais.service")
bash("systemctl is-active --quiet update-docker.cymais.service") bash("systemctl is-active --quiet update-docker.cymais.service")
print("Backup is running.") print("Backup is running.")
print(f"Trying again in {waiting_time} seconds.") print(f"Trying again in {waiting_time} seconds.")

View File

@@ -1,6 +1,6 @@
- name: "start sys-bkp-docker-to-local-everything.cymais.service" - name: "start sys-bkp-docker-2-loc-everything.cymais.service"
systemd: systemd:
name: sys-bkp-docker-to-local-everything.cymais.service name: sys-bkp-docker-2-loc-everything.cymais.service
state: started state: started
when: mode_backup | bool when: mode_backup | bool

View File

@@ -1 +0,0 @@
application_id: util-desk-office-tools

View File

@@ -1,4 +1,4 @@
# util-desk-office-tools Role # Office Tools
## Description ## Description
@@ -6,7 +6,7 @@ This Ansible role installs a comprehensive suite of office productivity tools on
## Overview ## Overview
The `util-desk-office-tools` role uses the `community.general.pacman` module to: The `util-desk-office` role uses the `community.general.pacman` module to:
1. Install **Chromium** (web browser) 1. Install **Chromium** (web browser)
2. Install **Thunderbird** (email and RSS client) 2. Install **Thunderbird** (email and RSS client)

View File

@@ -17,7 +17,7 @@ galaxy_info:
- editor - editor
repository: "https://github.com/kevinveenbirkenbach/cymais" repository: "https://github.com/kevinveenbirkenbach/cymais"
issue_tracker_url: "https://github.com/kevinveenbirkenbach/cymais/issues" issue_tracker_url: "https://github.com/kevinveenbirkenbach/cymais/issues"
documentation: "https://github.com/kevinveenbirkenbach/cymais/tree/main/roles/util-desk-office-tools" documentation: "https://github.com/kevinveenbirkenbach/cymais/tree/main/roles/util-desk-office"
min_ansible_version: "2.9" min_ansible_version: "2.9"
platforms: platforms:
- name: Archlinux - name: Archlinux

View File

@@ -0,0 +1 @@
application_id: util-desk-office

View File

@@ -10,7 +10,7 @@
database_name: "" # Multiple databases database_name: "" # Multiple databases
- name: "Seed BigBlueButton Database for Backup" - name: "Seed BigBlueButton Database for Backup"
include_tasks: "{{ playbook_dir }}/roles/sys-bkp-docker-to-local/tasks/seed-database-to-backup.yml" include_tasks: "{{ playbook_dir }}/roles/sys-bkp-docker-2-loc/tasks/seed-database-to-backup.yml"
vars: vars:
database_instance: "{{ application_id }}" database_instance: "{{ application_id }}"
database_password: "{{ applications | get_app_conf(application_id, 'credentials.postgresql_secret', True) }}" database_password: "{{ applications | get_app_conf(application_id, 'credentials.postgresql_secret', True) }}"

View File

@@ -4,3 +4,4 @@ ws_path: "/ws"
ws_port: "{{ ports.localhost.websocket[application_id] }}" ws_port: "{{ ports.localhost.websocket[application_id] }}"
client_max_body_size: "100m" client_max_body_size: "100m"
vhost_flavour: "ws_generic" vhost_flavour: "ws_generic"
docker_compose_flush_handlers: true

View File

@@ -10,4 +10,4 @@
when: applications | get_app_conf(application_id, 'features.central_database', False) when: applications | get_app_conf(application_id, 'features.central_database', False)
- name: "include seed-database-to-backup.yml" - name: "include seed-database-to-backup.yml"
include_tasks: "{{ playbook_dir }}/roles/sys-bkp-docker-to-local/tasks/seed-database-to-backup.yml" include_tasks: "{{ playbook_dir }}/roles/sys-bkp-docker-2-loc/tasks/seed-database-to-backup.yml"

View File

@@ -1,2 +1,3 @@
# Todo # Todo
- Check if sendmail needs to be installed. See [Issue](https://github.com/bitnami/containers/issues/63311). - Check if sendmail needs to be installed. See [Issue](https://github.com/bitnami/containers/issues/63311).
- Implemented auto update of database credentials when changed after first setup

View File

@@ -8,3 +8,4 @@ bitnami_data_dir: "/bitnami/moodledata"
bitnami_oidc_plugin_dir: "{{ bitnami_code_dir }}/auth/oidc" bitnami_oidc_plugin_dir: "{{ bitnami_code_dir }}/auth/oidc"
bitnami_user: "daemon" bitnami_user: "daemon"
bitnami_user_group: "{{ bitnami_user }}:{{ bitnami_user }}" bitnami_user_group: "{{ bitnami_user }}:{{ bitnami_user }}"
docker_compose_flush_handlers: true

View File

@@ -43,8 +43,8 @@ and disable any non-functioning apps.
```bash ```bash
cd {{path_docker_compose_instances}}nextcloud && cd {{path_docker_compose_instances}}nextcloud &&
docker-compose down && docker-compose down &&
docker-compose exec -i database mysql -u nextcloud -pPASSWORT nextcloud < "/Backups/$(sha256sum /etc/machine-id | head -c 64)/sys-bkp-docker-to-local/latest/nextcloud_database/sql/backup.sql" && docker-compose exec -i database mysql -u nextcloud -pPASSWORT nextcloud < "/Backups/$(sha256sum /etc/machine-id | head -c 64)/sys-bkp-docker-2-loc/latest/nextcloud_database/sql/backup.sql" &&
cd {{path_administrator_scripts}}sys-bkp-docker-to-local && cd {{path_administrator_scripts}}sys-bkp-docker-2-loc &&
bash ./recover-web-app-from-local.sh "nextcloud_data" "$(sha256sum /etc/machine-id | head -c 64)" bash ./recover-web-app-from-local.sh "nextcloud_data" "$(sha256sum /etc/machine-id | head -c 64)"
``` ```

View File

@@ -35,14 +35,14 @@
dest: "{{docker_compose.directories.volumes}}nginx.conf" dest: "{{docker_compose.directories.volumes}}nginx.conf"
notify: restart nextcloud nginx service notify: restart nextcloud nginx service
- name: Setup config.php
include_tasks: 01_config.yml
- name: Flush all handlers immediately so that occ can be used - name: Flush all handlers immediately so that occ can be used
meta: flush_handlers meta: flush_handlers
- name: Setup config.php
include_tasks: config.yml
- name: Setup Nextcloud Plugins - name: Setup Nextcloud Plugins
include_tasks: plugin.yml 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_control:
loop_var: plugin_item loop_var: plugin_item
@@ -51,7 +51,7 @@
plugin_value: "{{ plugin_item.value }}" plugin_value: "{{ plugin_item.value }}"
- name: Load system configuration - name: Load system configuration
include_tasks: system.yml include_tasks: 03_system.yml
- name: Add missing database indices in Nextcloud - name: Add missing database indices in Nextcloud
command: > command: >

View File

@@ -0,0 +1,7 @@
<?php
return [
'dbhost' => '{{ database_host }}:{{ database_port }}',
'dbname' => '{{ database_name }}',
'dbuser' => '{{ database_username }}',
'dbpassword' => '{{ database_password }}',
];

View File

@@ -164,7 +164,7 @@ plugin_configuration:
appid: "user_ldap" appid: "user_ldap"
configkey: "s01ldap_userlist_filter" configkey: "s01ldap_userlist_filter"
configvalue: |- configvalue: |-
{% if applications | get_app_conf(application_id, 'plugins', True).user_ldap.user_directory.enabled %} {% if applications | get_app_conf(application_id, 'plugins.user_ldap.user_directory.enabled', True) %}
{{ ldap.filters.users.all }} {{ ldap.filters.users.all }}
{% else %} {% else %}
() ()

View File

@@ -15,4 +15,4 @@
description: Reload the application description: Reload the application
icon: icon:
class: fa-solid fa-rotate-right class: fa-solid fa-rotate-right
url: "{{ domains | get_domain('web-app-port-ui') }}" url: "{{ web_protocol }}://{{ domains | get_domain('web-app-port-ui') }}"

View File

@@ -1,2 +1,3 @@
application_id: {{ application_id }} # ID of the application, should be the name of the role folder application_id: {{ application_id }} # ID of the application, should be the name of the role folder
database_type: 0 # Database type [postgres, mariadb] database_type: 0 # Database type [postgres, mariadb]
docker_compose_flush_handlers: true # When this is set to true an auto-flush after the docker-compose.yml, and env deploy is triggered, otherwise you have todo it manual.