Update 2 files

- /roles/ampache/handlers/main.yml
- /roles/ampache/tasks/main.yml
This commit is contained in:
Administrator 2025-10-16 08:37:50 +00:00
parent 14138bbbac
commit aefeec16ae
2 changed files with 20 additions and 11 deletions

View File

@ -1,5 +0,0 @@
---
- name: restart ampache
community.docker.docker_compose_v2:
project_src: "{{ ampache_base_dir }}"
state: restarted

View File

@ -16,14 +16,28 @@
- "{{ ampache_mysql_dir }}"
- /mnt/audio/music
- name: Deploy Ampache docker-compose
- name: Deploy Ampache docker-compose.yml
template:
src: docker-compose.yml.j2
dest: "{{ ampache_base_dir }}/docker-compose.yml"
mode: 0644
notify: restart ampache
- name: Ensure Ampache is running
community.docker.docker_compose_v2:
project_src: "{{ ampache_base_dir }}"
state: present
- name: Start Ampache services
shell: |
cd {{ ampache_base_dir }}
docker compose up -d
args:
executable: /bin/bash
- name: Wait for services to start
pause:
seconds: 15
- name: Check Ampache container status
shell: docker ps --filter name=ampache
register: ampache_status
changed_when: false
- name: Show Ampache status
debug:
var: ampache_status.stdout