- /group_vars/all.yml - /roles/immich/templates/.env.j2 - /roles/immich/templates/docker-compose.yml.j2 - /roles/immich/tasks/main.yml - /inventories/hosts - /olimp-deploy.yml
42 lines
889 B
YAML
42 lines
889 B
YAML
---
|
|
- name: Create Immich directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: 0755
|
|
loop:
|
|
- "{{ immich_base_dir }}"
|
|
- /mnt/immich/postgres
|
|
- /mnt/immich_upload
|
|
|
|
- name: Deploy Immich docker-compose.yml
|
|
template:
|
|
src: docker-compose.yml.j2
|
|
dest: "{{ immich_base_dir }}/docker-compose.yml"
|
|
mode: 0644
|
|
|
|
- name: Deploy Immich .env file
|
|
template:
|
|
src: .env.j2
|
|
dest: "{{ immich_base_dir }}/.env"
|
|
mode: 0644
|
|
|
|
- name: Start Immich services
|
|
shell: |
|
|
cd {{ immich_base_dir }}
|
|
docker compose up -d
|
|
args:
|
|
executable: /bin/bash
|
|
|
|
- name: Wait for services to start
|
|
pause:
|
|
seconds: 30
|
|
|
|
- name: Check Immich container status
|
|
shell: docker ps --filter name=immich
|
|
register: immich_status
|
|
changed_when: false
|
|
|
|
- name: Show Immich status
|
|
debug:
|
|
var: immich_status.stdout |