2022-09-27 12:32:48 +02:00
|
|
|
---
|
2022-09-28 09:30:25 +02:00
|
|
|
# tasks file for arrs
|
2022-09-29 22:51:29 +02:00
|
|
|
- name: Set up main directory
|
2022-09-28 09:30:25 +02:00
|
|
|
ansible.builtin.file:
|
|
|
|
state: directory
|
|
|
|
path: "{{ item }}"
|
|
|
|
owner: "{{ ansible_effective_user_id }}"
|
|
|
|
group: "{{ ansible_effective_group_id }}"
|
|
|
|
mode: "0750"
|
2022-09-29 22:19:52 +02:00
|
|
|
with_items:
|
|
|
|
- "{{ arrs_setup_path }}"
|
|
|
|
tags:
|
|
|
|
- configuration
|
|
|
|
become: true
|
|
|
|
|
2022-09-29 22:51:29 +02:00
|
|
|
- name: Set up config directories
|
2022-09-29 22:19:52 +02:00
|
|
|
ansible.builtin.file:
|
|
|
|
state: directory
|
|
|
|
path: "{{ item }}"
|
2022-09-30 08:00:33 +02:00
|
|
|
owner: "{% if arrs_uid %}{{ arrs_uid }}{% else %}{{ ansible_effective_user_id }}{% endif %}"
|
|
|
|
group: "{% if arrs_gid %}{{ arrs_gid }}{% else %}{{ ansible_effective_group_id }}{% endif %}"
|
2022-09-29 22:19:52 +02:00
|
|
|
mode: "0750"
|
2022-09-28 09:30:25 +02:00
|
|
|
with_items:
|
|
|
|
- "{{ deluge_config_volume }}"
|
2022-09-29 20:12:35 +02:00
|
|
|
- "{{ radarr_config_volume }}"
|
2022-09-28 09:30:25 +02:00
|
|
|
- "{{ sonarr_config_volume }}"
|
|
|
|
- "{{ lidarr_config_volume }}"
|
|
|
|
- "{{ jackett_config_volume }}"
|
|
|
|
tags:
|
|
|
|
- configuration
|
|
|
|
become: true
|
|
|
|
|
2022-09-29 22:51:29 +02:00
|
|
|
- name: Set up upload directories
|
|
|
|
ansible.builtin.file:
|
|
|
|
state: directory
|
|
|
|
path: "{{ item }}"
|
2022-09-30 08:00:33 +02:00
|
|
|
owner: "{% if arrs_uid %}{{ arrs_uid }}{% else %}{{ ansible_effective_user_id }}{% endif %}"
|
|
|
|
group: "{% if arrs_gid %}{{ arrs_gid }}{% else %}{{ ansible_effective_group_id }}{% endif %}"
|
2022-09-29 22:51:29 +02:00
|
|
|
mode: "0750"
|
|
|
|
with_items:
|
|
|
|
- "{{ radarr_upload_volume }}"
|
|
|
|
- "{{ sonarr_upload_volume }}"
|
|
|
|
- "{{ lidarr_upload_volume }}"
|
|
|
|
tags:
|
|
|
|
- configuration
|
|
|
|
become: true
|
|
|
|
|
2022-09-28 09:30:25 +02:00
|
|
|
- name: Write configuration files
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "{{ item }}.j2"
|
|
|
|
dest: "{{ arrs_setup_path }}/{{ item }}"
|
|
|
|
mode: '0640'
|
|
|
|
loop:
|
|
|
|
- "docker-compose.yml"
|
|
|
|
- "env.deluge.conf"
|
2022-09-29 20:14:29 +02:00
|
|
|
- "env.radarr.conf"
|
2022-09-28 09:30:25 +02:00
|
|
|
- "env.sonarr.conf"
|
|
|
|
- "env.lidarr.conf"
|
|
|
|
- "env.jackett.conf"
|
2024-01-26 19:06:58 +01:00
|
|
|
- "env.flaresolverr.conf"
|
2022-09-28 09:30:25 +02:00
|
|
|
tags:
|
|
|
|
- configuration
|
|
|
|
|
|
|
|
- name: Ensure all requested components are running.
|
|
|
|
community.docker.docker_compose:
|
|
|
|
project_src: "{{ arrs_setup_path }}"
|
|
|
|
build: false
|
2024-01-26 13:50:50 +01:00
|
|
|
pull: true
|
2022-09-28 09:30:25 +02:00
|
|
|
become: false
|