docker service config
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
vars:
|
||||
restic_repo: "s3:http://misamisa.duckdns.org:9000/resticbackup"
|
||||
restore_target_path: "/apps"
|
||||
restore_target_path: "/"
|
||||
# restic_password_value: "Stored in vault"
|
||||
|
||||
tasks:
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
- name: Check if app data directory exists
|
||||
stat:
|
||||
path: "/app/"
|
||||
path: "/apps/"
|
||||
register: app_data
|
||||
|
||||
- name: Restic restore app data Dir
|
||||
@@ -46,12 +46,22 @@
|
||||
|
||||
when: not app_data.stat.exists or not app_data.stat.isdir
|
||||
|
||||
- name: Copy docker-compose.yml from repo
|
||||
ansible.builtin.copy:
|
||||
src: ./{{ ansible_hostname }}/docker-compose.yml
|
||||
dest: /apps/docker/docker-compose.yml
|
||||
|
||||
- name: Copy docker-compose.env from repo
|
||||
ansible.builtin.copy:
|
||||
src: ./{{ ansible_hostname }}/docker-compose.env
|
||||
dest: /apps/docker/docker-compose.env
|
||||
|
||||
- name: Reload systemd daemon
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Start App Service
|
||||
systemd:
|
||||
name: "{{ ansible_hostname }}"
|
||||
name: app
|
||||
state: started
|
||||
enabled: yes
|
||||
Reference in New Issue
Block a user