Compare commits

..

No commits in common. "67f54c2a16fa7c5118788c16407e0e628e28b204" and "617c2eac9eab5d56e134d26f3ad8d2755b4e1321" have entirely different histories.

19 changed files with 25 additions and 36 deletions

View File

@ -68,11 +68,10 @@ nginx_matomo_tracking: false # Activates matomo tracking on all html pa
# System maintenance Services # System maintenance Services
## Timeouts to wait for other services to stop ## Timeouts to wait for other services to stop
sytem_maintenance_lock_timeout_cleanup_services: "15min" sytem_maintenance_lock_timeoutcleanup_services: "15min"
sytem_maintenance_lock_timeout_storage_optimizer: "10min" sytem_maintenance_lock_timeoutbackup_services: "1h"
sytem_maintenance_lock_timeout_backup_services: "1h" sytem_maintenance_lock_timeoutheal_docker: "30min"
sytem_maintenance_lock_timeout_heal_docker: "30min" sytem_maintenance_lock_timeoutupdate_docker: "2min"
sytem_maintenance_lock_timeout_update_docker: "2min"
## Services ## Services
@ -113,7 +112,6 @@ nginx_upstreams_directory: "{{nginx_configuration_directory}}upstreams/"
### Enable Central MariaDB ### Enable Central MariaDB
enable_central_database: true enable_central_database: true
enable_central_database_mailu: "{{enable_central_database}}"
### Domain Names for Various Services ### Domain Names for Various Services
domain_akaunting: "akaunting.{{top_domain}}" domain_akaunting: "akaunting.{{top_domain}}"

View File

@ -77,7 +77,6 @@
vars: vars:
domain: "{{domain_mailu}}" domain: "{{domain_mailu}}"
http_port: 8007 http_port: 8007
enable_central_database: "{{enable_central_database_mailu}}"
- name: setup elk hosts - name: setup elk hosts
hosts: elk hosts: elk

View File

@ -4,5 +4,5 @@ OnFailure=systemd-notifier.cymais@%n.service cleanup-failed-docker-backups.cymai
[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', 'backup-docker-to-local') | join(' ') }} --timeout "{{sytem_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', 'backup-docker-to-local') | join(' ') }} --timeout "{{sytem_maintenance_lock_timeoutbackup_services}}"'
ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py --everything' ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py --everything'

View File

@ -4,5 +4,5 @@ OnFailure=systemd-notifier.cymais@%n.service cleanup-failed-docker-backups.cymai
[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', 'backup-docker-to-local-everything') | join(' ') }} --timeout "{{sytem_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', 'backup-docker-to-local-everything') | join(' ') }} --timeout "{{sytem_maintenance_lock_timeoutbackup_services}}"'
ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py' ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py'

View File

@ -4,5 +4,5 @@ OnFailure=systemd-notifier.cymais@%n.service cleanup-failed-docker-backups.cymai
[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| join(' ') }} --timeout "{{sytem_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| join(' ') }} --timeout "{{sytem_maintenance_lock_timeoutbackup_services}}"'
ExecStart=/bin/sh -c '/usr/bin/bash {{docker_backup_remote_to_local_folder}}backups-remote-to-local.sh' ExecStart=/bin/sh -c '/usr/bin/bash {{docker_backup_remote_to_local_folder}}backups-remote-to-local.sh'

View File

@ -4,5 +4,5 @@ OnFailure=systemd-notifier.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 {{system_maintenance_cleanup_services| join(' ') }} --timeout "{{sytem_maintenance_lock_timeout_backup_services}}"' ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{system_maintenance_cleanup_services| join(' ') }} --timeout "{{sytem_maintenance_lock_timeoutbackup_services}}"'
ExecStart=/bin/sh -c '/usr/bin/python {{docker_cleanup_backups}}cleanup-backups.py --backups-folder-path {{backups_folder_path}} --maximum-backup-size-percent {{size_percent_maximum_backup}}' ExecStart=/bin/sh -c '/usr/bin/python {{docker_cleanup_backups}}cleanup-backups.py --backups-folder-path {{backups_folder_path}} --maximum-backup-size-percent {{size_percent_maximum_backup}}'

View File

@ -4,5 +4,5 @@ OnFailure=systemd-notifier.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 {{system_maintenance_cleanup_services| join(' ') }} --timeout "{{sytem_maintenance_lock_timeout_backup_services}}"' ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{system_maintenance_cleanup_services| join(' ') }} --timeout "{{sytem_maintenance_lock_timeoutbackup_services}}"'
ExecStart=/bin/sh -c '/bin/bash {{cleanup_disc_space_folder}}cleanup-disc-space.sh {{size_percent_cleanup_disc_space}}' ExecStart=/bin/sh -c '/bin/bash {{cleanup_disc_space_folder}}cleanup-disc-space.sh {{size_percent_cleanup_disc_space}}'

View File

@ -4,5 +4,5 @@ OnFailure=systemd-notifier.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 {{system_maintenance_cleanup_services| join(' ') }} --timeout "{{sytem_maintenance_lock_timeout_backup_services}}"' ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{system_maintenance_cleanup_services| join(' ') }} --timeout "{{sytem_maintenance_lock_timeoutbackup_services}}"'
ExecStart=/bin/sh -c '/usr/bin/yes | /usr/bin/bash {{backup_docker_to_local_cleanup_folder}}cleanup-all.sh {{backup_docker_to_local_cleanup_trigger_directory}}' ExecStart=/bin/sh -c '/usr/bin/yes | /usr/bin/bash {{backup_docker_to_local_cleanup_folder}}cleanup-all.sh {{backup_docker_to_local_cleanup_trigger_directory}}'

View File

@ -1,6 +1,6 @@
server { server {
# listen 443 ssl http2 default_server; listen 443 ssl http2 default_server;
# listen [::]:443 ssl http2 default_server; listen [::]:443 ssl http2 default_server;
server_name {{domain}}; server_name {{domain}};
ssl_certificate /etc/letsencrypt/live/{{domain}}/fullchain.pem; ssl_certificate /etc/letsencrypt/live/{{domain}}/fullchain.pem;

View File

@ -1,6 +1,6 @@
docker_compose_project_name: "bigbluebutton" docker_compose_project_name: "bigbluebutton"
#database_host: "postgres" # needs to be fixed database_host: "postgres" # needs to be fixed
#database_name: "greenlight-v3" database_name: "greenlight-v3"
#database_username: "postgres" database_username: "postgres"
#database_password: "" database_password: ""
#database_type: "postgres" database_type: "postgres"

View File

@ -19,9 +19,7 @@
when: mode_reset | bool when: mode_reset | bool
- name: add docker-compose.yml - name: add docker-compose.yml
template: template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
src: docker-compose.yml.j2
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
notify: docker compose project setup notify: docker compose project setup
- name: flush, to recreate discourse docker compose - name: flush, to recreate discourse docker compose

View File

@ -4,5 +4,5 @@ OnFailure=systemd-notifier.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 {{system_maintenance_cleanup_services| join(' ') }} heal-docker --timeout "{{sytem_maintenance_lock_timeout_heal_docker}}"' ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{system_maintenance_cleanup_services| join(' ') }} heal-docker --timeout "{{sytem_maintenance_lock_timeoutheal_docker}}"'
ExecStart=/bin/sh -c '/bin/python {{heal_docker}}heal-docker.py' ExecStart=/bin/sh -c '/bin/python {{heal_docker}}heal-docker.py'

View File

@ -55,7 +55,7 @@ def pause_and_move(storage_path, volume, volume_path, containers):
os.makedirs(storage_volume_path,exist_ok=False) os.makedirs(storage_volume_path,exist_ok=False)
# Move the data # Move the data
run_rsync(f"{volume_path}/",f"{storage_volume_path}/") run_rsync(volume_path, storage_volume_path)
# Delete the source directory # Delete the source directory
delete_directory(volume_path) delete_directory(volume_path)

View File

@ -1,5 +0,0 @@
- name: "reload system-storage-optimizer.cymais.service"
systemd:
name: system-storage-optimizer.cymais.service
state: reloaded
daemon_reload: yes

View File

@ -8,7 +8,6 @@
template: template:
src: system-storage-optimizer.service.j2 src: system-storage-optimizer.service.j2
dest: /etc/systemd/system/system-storage-optimizer.cymais.service dest: /etc/systemd/system/system-storage-optimizer.cymais.service
notify: reload system-storage-optimizer.cymais.service
- name: create system-storage-optimizer.py - name: create system-storage-optimizer.py
copy: copy:

View File

@ -4,5 +4,5 @@ OnFailure=systemd-notifier.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 system-storage-optimizer backup-remote-to-local --timeout "{{sytem_maintenance_lock_timeout_storage_optimizer}}"' ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore system-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

@ -4,5 +4,5 @@ OnFailure=systemd-notifier.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 {{system_maintenance_cleanup_services | join(' ') }} update-docker --timeout "{{sytem_maintenance_lock_timeout_heal_docker}}"' ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{system_maintenance_cleanup_services | join(' ') }} update-docker --timeout "{{sytem_maintenance_lock_timeoutheal_docker}}"'
ExecStart=/bin/sh -c '/usr/bin/python {{update_docker_script}} {{path_docker_compose_instances}}' ExecStart=/bin/sh -c '/usr/bin/python {{update_docker_script}} {{path_docker_compose_instances}}'

View File

@ -1,6 +1,6 @@
- name: "restart wireguard" - name: "restart wireguard"
systemd: systemd:
name: wg-quick@wg0.cymais.service name: wg-quick.cymais@wg0.service
state: restarted state: restarted
enabled: yes enabled: yes
daemon_reload: yes daemon_reload: yes

View File

@ -18,10 +18,10 @@
group: root group: root
notify: reload sysctl configuration notify: reload sysctl configuration
- name: create /etc/wireguard/wg0.cymais.conf - name: create /etc/wireguard/wg0.conf
copy: copy:
src: "{{ inventory_dir }}/files/{{ inventory_hostname }}/etc/wireguard/wg0.conf" src: "{{ inventory_dir }}/files/{{ inventory_hostname }}/etc/wireguard/wg0.conf"
dest: /etc/wireguard/wg0.cymais.conf dest: /etc/wireguard/wg0.conf
owner: root owner: root
group: root group: root
notify: restart wireguard notify: restart wireguard