mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 23:08:06 +02:00
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:
@@ -3,6 +3,8 @@
|
||||
include_role:
|
||||
name: "{{ item }}"
|
||||
loop:
|
||||
- user-administrator
|
||||
- user-root
|
||||
- sys-svc-sshd
|
||||
- sys-svc-journalctl
|
||||
- sys-hlth-disc-space
|
||||
|
@@ -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)
|
||||
|
@@ -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 }}"
|
||||
|
Reference in New Issue
Block a user