mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 23:08:06 +02:00
Added auto snippet for webserver injection
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user