15 lines
371 B
YAML
15 lines
371 B
YAML
---
|
|
- name: Deploy application
|
|
hosts: "{{ target_host }}"
|
|
vars:
|
|
repo_path: "/home/{{ ansible_user }}/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 }}"
|