Added auto snippet for webserver injection

This commit is contained in:
2025-08-16 01:31:49 +02:00
parent eadcb62f2a
commit f0b323afee
19 changed files with 200 additions and 37 deletions

View File

@@ -9,9 +9,9 @@
- 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 }}"
removes: "{{ docker_compose.directories.instance }}{{ item }}"
become: true
loop: "{{ merged_detached_files | default(detached_files) }}"
@@ -19,12 +19,12 @@
ansible.builtin.shell: git checkout .
become: true
args:
chdir: "{{docker_compose.directories.instance}}"
chdir: "{{ docker_compose.directories.instance }}"
ignore_errors: true
- 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"
become: true
@@ -33,6 +33,6 @@
- name: "copy {{ detached_files }} templates to server"
template:
src: "{{ item }}.j2"
dest: "{{docker_compose.directories.instance}}{{ item }}"
dest: "{{ docker_compose.directories.instance }}{{ item }}"
loop: "{{ detached_files }}"
notify: docker compose up