Add deploy.yml
This commit is contained in:
parent
d8a20d7415
commit
a90be7d4d2
1 changed files with 15 additions and 0 deletions
15
deploy.yml
Normal file
15
deploy.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
- name: Deploy application
|
||||||
|
hosts: "{{ target_host }}"
|
||||||
|
vars:
|
||||||
|
repo_path: /Auto-Homelab/{{ folder }}
|
||||||
|
tasks:
|
||||||
|
- name: Ensure the repository is up-to-date
|
||||||
|
shell: git pull
|
||||||
|
args:
|
||||||
|
chdir: "{{ repo_path }}"
|
||||||
|
|
||||||
|
- name: Restart services
|
||||||
|
command: docker-compose up -d
|
||||||
|
args:
|
||||||
|
chdir: "{{ repo_path }}"
|
Reference in a new issue