Split arr role from playbook

This commit is contained in:
Marty Oehme 2025-04-12 09:39:39 +02:00
parent eaaa35de25
commit 71244751c7
Signed by: Marty
GPG key ID: 4E535BC19C61886E
11 changed files with 356 additions and 11 deletions

View file

@ -1,11 +0,0 @@
---
- name: Deploy wallabag to swarm
community.general.docker_stack:
name: arr
state: present
prune: true
compose:
- "{{ lookup('template', 'docker-stack.yml.j2') | from_yaml }}"
become: true
tags:
- docker-swarm

View file

@ -0,0 +1,55 @@
---
- name: Create Arr stack environment directory
ansible.builtin.file:
state: directory
path: "{{ arrstack_env_dir }}"
owner: root
group: root
mode: 0700
- name: Create Arr stack data directory
ansible.builtin.file:
state: directory
path: "{{ arrstack_data_dir }}/{{ item }}"
owner: "{{ arrstack_data_dir_owner }}"
group: "{{ arrstack_data_dir_group }}"
mode: 0770
when: arrstack_data_dir_create
loop:
- ""
- files
- files/torrents
- files/usenet
- media
- media/tv
- media/movies
- media/music
- media/audiobooks
# - name: Create Docker Compose environment file
# ansible.builtin.template:
# src: docker-compose.yml.j2
# dest: "{{ arrstack_env_dir }}/docker-compose.yml"
# owner: root
# group: root
# mode: 0600
- name: Install pyyaml # necessary for compose_v2
ansible.builtin.package:
name: python3-yaml
state: present
- name: Start the compose stack
community.docker.docker_compose_v2:
project_name: arr
# project_src: "{{ arrstack_env_dir }}"
definition: "{{ lookup('template', 'docker-compose.yaml.j2') | from_yaml }}"
wait: true
wait_timeout: 60
# services:
# - transmission
# - flaresolverr
# - sonarr-hd
# - sonarr-4k
# - sonarr-anime
# - prowlarr