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:
boris committed 2026-07-08 10:29:51 +01:00
commit 53695f4fff
411 files changed
+7817

No files matched your search

+65
View File
@@ -0,0 +1,65 @@
---
- name: Create Arr stack directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: root
group: root
mode: "0755"
loop:
- "{{ arr_dir }}"
- "{{ arr_config_root }}"
- "{{ arr_media_root }}"
- "{{ arr_downloads_root }}"
tags: [arr]
- name: Create Arr application config directories
ansible.builtin.file:
path: "{{ arr_config_root }}/{{ item.key }}"
state: directory
owner: root
group: root
mode: "0755"
loop: "{{ arr_services | dict2items }}"
tags: [arr, config]
- name: Render Arr environment
ansible.builtin.template:
src: env.j2
dest: "{{ arr_dir }}/.env"
owner: root
group: root
mode: "0644"
tags: [arr, config]
- name: Ensure Arr proxy network exists
community.docker.docker_network:
name: "{{ arr_traefik_network }}"
state: present
when: arr_routing_mode == "traefik"
tags: [arr, docker]
- name: Render Arr Compose file
ansible.builtin.template:
src: compose.yaml.j2
dest: "{{ arr_dir }}/compose.yaml"
owner: root
group: root
mode: "0644"
notify: restart arr
tags: [arr, compose]
- name: Allow Arr ports
community.general.ufw:
rule: allow
port: "{{ item }}"
proto: tcp
loop: "{{ arr_tcp_ports }}"
when: arr_routing_mode == "host"
tags: [arr, firewall]
- name: Start Arr stack
community.docker.docker_compose_v2:
project_src: "{{ arr_dir }}"
state: present
tags: [arr, compose]