Initialise repository structure and placeholder files. Generic functionality works i guess, need to come up with a better solution for compose templates
This commit is contained in:
commit
53695f4fff
411 files changed
+7817
No files matched your search
@@ -0,0 +1,54 @@
|
||||
---
|
||||
- name: Create Immich directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
loop:
|
||||
- "{{ immich_dir }}"
|
||||
- "{{ immich_upload_location }}"
|
||||
tags: [immich]
|
||||
|
||||
- name: Render Immich environment
|
||||
ansible.builtin.template:
|
||||
src: env.j2
|
||||
dest: "{{ immich_dir }}/.env"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
no_log: true
|
||||
tags: [immich, config]
|
||||
|
||||
- name: Ensure Immich proxy network exists
|
||||
community.docker.docker_network:
|
||||
name: "{{ immich_traefik_network }}"
|
||||
state: present
|
||||
when: immich_routing_mode == "traefik"
|
||||
tags: [immich, docker]
|
||||
|
||||
- name: Render Immich Compose file
|
||||
ansible.builtin.template:
|
||||
src: compose.yaml.j2
|
||||
dest: "{{ immich_dir }}/compose.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify: restart immich
|
||||
tags: [immich, compose]
|
||||
|
||||
- name: Allow Immich ports
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: "{{ item }}"
|
||||
proto: tcp
|
||||
loop: "{{ immich_tcp_ports }}"
|
||||
when: immich_routing_mode == "host"
|
||||
tags: [immich, firewall]
|
||||
|
||||
- name: Start Immich
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ immich_dir }}"
|
||||
state: present
|
||||
tags: [immich, compose]
|
||||
Reference in new issue
Block a user