THE HUGE REFACTORING CALENDER WEEK 33; Optimized Matrix and during this updated variables, and implemented better reset and cleanup mode handling, also solved some initial setup bugs

This commit is contained in:
2025-08-15 15:15:48 +02:00
parent 0228014d34
commit 022800425d
271 changed files with 1098 additions and 916 deletions

View File

@@ -3,6 +3,8 @@
include_role:
name: "{{ item }}"
loop:
- user-administrator
- user-root
- sys-svc-sshd
- sys-svc-journalctl
- sys-hlth-disc-space

View File

@@ -4,7 +4,7 @@
- name: "Ensure that {{ docker_compose.directories.instance }} is up"
# This is a little hack to guaranty that the docker containers are allways up
# It isn't the cleanest solution to have it here but it should fullfill their purpose
include_tasks: "{{ playbook_dir }}/roles/docker-compose/tasks/04_ensure_up.yml"
include_tasks: "{{ playbook_dir }}/roles/docker-compose/tasks/05_ensure_up.yml"
when:
- docker_compose is defined
- (application_id | get_entity_name) == (docker_compose.directories.instance | basename)

View File

@@ -9,7 +9,7 @@
- name: "backup detached files"
command: >
mv "{{docker_compose.directories.instance}}{{ item }}" "/tmp/{{application_id}}-{{ item }}.backup"
mv "{{docker_compose.directories.instance}}{{ item }}" "/tmp/{{ application_id }}-{{ item }}.backup"
args:
removes: "{{docker_compose.directories.instance}}{{ item }}"
become: true
@@ -24,14 +24,14 @@
- name: "restore detached files"
command: >
mv "/tmp/{{application_id}}-{{ item }}.backup" "{{docker_compose.directories.instance}}{{ item }}"
mv "/tmp/{{ application_id }}-{{ item }}.backup" "{{docker_compose.directories.instance}}{{ item }}"
args:
removes: "/tmp/{{application_id}}-{{ item }}.backup"
removes: "/tmp/{{ application_id }}-{{ item }}.backup"
become: true
loop: "{{ merged_detached_files | default(detached_files) }}"
- name: "copy {{ detached_files }} templates to server"
template:
template:
src: "{{ item }}.j2"
dest: "{{docker_compose.directories.instance}}{{ item }}"
loop: "{{ detached_files }}"