Finished new role identification system implementation

This commit is contained in:
2025-07-11 00:42:36 +02:00
parent 292918da81
commit 6e32b20240
44 changed files with 212 additions and 218 deletions

View File

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

View File

@@ -1 +1,2 @@
backup_directory_validator_folder: "{{path_administrator_scripts}}directory-validator/"
backup_directory_validator_folder: '{{path_administrator_scripts}}directory-validator/'
application_id: directory-validator

View File

@@ -1 +1,2 @@
bkp_docker_to_local_pkg: backup-docker-to-local
bkp_docker_to_local_pkg: backup-docker-to-local
application_id: docker-to-local

View File

@@ -1,2 +1,3 @@
authorized_keys_path: "{{ inventory_dir }}/files/{{ inventory_hostname }}/home/backup/.ssh/authorized_keys"
authorized_keys_list: "{{ lookup('file', authorized_keys_path).splitlines() }}"
authorized_keys_path: '{{ inventory_dir }}/files/{{ inventory_hostname }}/home/backup/.ssh/authorized_keys'
authorized_keys_list: '{{ lookup(''file'', authorized_keys_path).splitlines() }}'
application_id: provider-user

View File

@@ -0,0 +1 @@
application_id: provider

View File

@@ -1 +1,2 @@
docker_backup_remote_to_local_folder: "{{path_administrator_scripts}}bkp-remote-to-local/"
docker_backup_remote_to_local_folder: '{{path_administrator_scripts}}bkp-remote-to-local/'
application_id: remote-to-local

View File

@@ -92,7 +92,7 @@ roles:
title: "Backup & Restore"
description: "Backup strategies & restore procedures"
icon: "fas fa-hdd"
invokable: false
invokable: true
update:
title: "Updates & Package Management"
description: "OS & package updates"
@@ -103,3 +103,8 @@ roles:
description: "User accounts & access control"
icon: "fas fa-users"
invokable: false
cln:
title: "Cleanup"
description: "Roles for cleaning up various system resources—old backups, unused certificates, temporary files, Docker volumes, disk caches, deprecated domains, and more."
icon: "fas fa-trash-alt"
invokable: true

View File

@@ -1 +1,2 @@
cleanup_backups_directory: "{{path_administrator_scripts}}cln-backups/"
cleanup_backups_directory: '{{path_administrator_scripts}}cln-backups/'
application_id: backups-service

View File

@@ -0,0 +1 @@
application_id: backups-timer

View File

@@ -0,0 +1 @@
application_id: certs

View File

@@ -1 +1,2 @@
cleanup_disc_space_folder: "{{path_administrator_scripts}}cln-disc-space/"
cleanup_disc_space_folder: '{{path_administrator_scripts}}cln-disc-space/'
application_id: disc-space

View File

@@ -0,0 +1 @@
application_id: docker-anonymous-volumes

View File

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

View File

@@ -0,0 +1,22 @@
- name: "create {{storage_optimizer_directory}}"
file:
path: "{{storage_optimizer_directory}}"
state: directory
mode: 0755
- name: create cln-docker-storage-optimizer.cymais.service
template:
src: cln-docker-storage-optimizer.service.j2
dest: /etc/systemd/system/cln-docker-storage-optimizer.cymais.service
notify: reload cln-docker-storage-optimizer.cymais.service
- name: create cln-docker-storage-optimizer.py
copy:
src: cln-docker-storage-optimizer.py
dest: "{{storage_optimizer_script}}"
mode: 0755
- name: "optimize storage performance"
systemd:
name: cln-docker-storage-optimizer.cymais.service
state: started

View File

@@ -4,5 +4,5 @@ OnFailure=alert-compose.cymais@%n.service
[Service]
Type=oneshot
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore maint-docker-storage-optimizer bkp-remote-to-local --timeout "{{system_maintenance_lock_timeout_storage_optimizer}}"'
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore cln-docker-storage-optimizer bkp-remote-to-local --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}}'

View File

@@ -0,0 +1,3 @@
storage_optimizer_directory: '{{path_administrator_scripts}}cln-docker-storage-optimizer/'
storage_optimizer_script: '{{storage_optimizer_directory}}cln-docker-storage-optimizer.py'
application_id: docker-storage-optimizer

View File

@@ -0,0 +1 @@
application_id: domains

View File

@@ -1 +1,2 @@
cln_failed_docker_backups_pkg: cleanup-failed-docker-backups
cln_failed_docker_backups_pkg: cleanup-failed-docker-backups
application_id: failed-docker-backups

View File

@@ -1 +1 @@
application_id: docker
application_id: desk-docker

View File

@@ -17,4 +17,4 @@ galaxy_info:
- git
- configuration
- pacman
- personal-computer
- desktop

View File

@@ -16,7 +16,7 @@
group: administrator
when: run_once_docker is not defined
- name: Set docker_enabled to true, to activate maint-docker-storage-optimizer
- name: Set docker_enabled to true, to activate cln-docker-storage-optimizer
set_fact:
docker_enabled: true
when: run_once_docker is not defined

View File

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

View File

@@ -1,22 +0,0 @@
- name: "create {{storage_optimizer_directory}}"
file:
path: "{{storage_optimizer_directory}}"
state: directory
mode: 0755
- name: create maint-docker-storage-optimizer.cymais.service
template:
src: maint-docker-storage-optimizer.service.j2
dest: /etc/systemd/system/maint-docker-storage-optimizer.cymais.service
notify: reload maint-docker-storage-optimizer.cymais.service
- name: create maint-docker-storage-optimizer.py
copy:
src: maint-docker-storage-optimizer.py
dest: "{{storage_optimizer_script}}"
mode: 0755
- name: "optimize storage performance"
systemd:
name: maint-docker-storage-optimizer.cymais.service
state: started

View File

@@ -1,3 +0,0 @@
storage_optimizer_directory: '{{path_administrator_scripts}}maint-docker-storage-optimizer/'
storage_optimizer_script: '{{storage_optimizer_directory}}maint-docker-storage-optimizer.py'
application_id: docker-storage-optimizer

View File

@@ -1,4 +1,4 @@
application_id: simpleicons
application_id: simpleicons
container_port: 3000
simpleicons_host_server_file: "{{docker_compose.directories.config}}server.js"
simpleicons_host_package_file: "{{docker_compose.directories.config}}package.json"