mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Finished new role identification system implementation
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
1
roles/bkp-provider/vars/main.yml
Normal file
1
roles/bkp-provider/vars/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
application_id: provider
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -1 +1,2 @@
|
||||
cleanup_backups_directory: "{{path_administrator_scripts}}cln-backups/"
|
||||
cleanup_backups_directory: '{{path_administrator_scripts}}cln-backups/'
|
||||
application_id: backups-service
|
||||
|
1
roles/cln-backups-timer/vars/main.yml
Normal file
1
roles/cln-backups-timer/vars/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
application_id: backups-timer
|
1
roles/cln-certs/vars/main.yml
Normal file
1
roles/cln-certs/vars/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
application_id: certs
|
@@ -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
|
||||
|
1
roles/cln-docker-anonymous-volumes/vars/main.yml
Normal file
1
roles/cln-docker-anonymous-volumes/vars/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
application_id: docker-anonymous-volumes
|
5
roles/cln-docker-storage-optimizer/handlers/main.yml
Normal file
5
roles/cln-docker-storage-optimizer/handlers/main.yml
Normal 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
|
22
roles/cln-docker-storage-optimizer/tasks/main.yml
Normal file
22
roles/cln-docker-storage-optimizer/tasks/main.yml
Normal 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
|
@@ -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}}'
|
3
roles/cln-docker-storage-optimizer/vars/main.yml
Normal file
3
roles/cln-docker-storage-optimizer/vars/main.yml
Normal 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
|
1
roles/cln-domains/vars/main.yml
Normal file
1
roles/cln-domains/vars/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
application_id: domains
|
@@ -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
|
||||
|
@@ -1 +1 @@
|
||||
application_id: docker
|
||||
application_id: desk-docker
|
||||
|
@@ -17,4 +17,4 @@ galaxy_info:
|
||||
- git
|
||||
- configuration
|
||||
- pacman
|
||||
- personal-computer
|
||||
- desktop
|
@@ -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
|
||||
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -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"
|
Reference in New Issue
Block a user