radarr: add role

This commit is contained in:
Lukáš Kucharczyk 2021-06-21 13:08:59 +02:00
parent b8364d8163
commit 6ebb25af72
No known key found for this signature in database
GPG Key ID: 65524498C0196B64
2 changed files with 35 additions and 0 deletions

View File

@ -9,6 +9,7 @@
- postgres
- authelia
- keycloak
- radarr
vars_files:
- vault/certs/{{ base_domain }}.yml
- vault/passwords.yml

View File

@ -0,0 +1,34 @@
- name: ensure directories exist
file:
path: "{{ item }}"
state: directory
mode: '0755'
loop:
- "{{ data_folder }}/radarr"
- "{{ media.tv }}"
- "{{ media.movies }}"
- "{{ downloads.nzb }}"
- name: run container
docker_container:
name: "{{ role_name }}"
image: "linuxserver/radarr"
networks:
- name: external
env:
"TZ": "{{ tz }}"
"PUID": "{{ puid }}"
"PGID": "{{ pgid }}"
"UMASK": "022"
volumes:
- "{{ data_folder }}/radarr:/config"
- "{{ downloads.nzb }}:/downloads"
- "{{ media.movies }}:/movies"
ports:
- "7878:7878"
state: started
- name: copy nginx conf
template:
src: "{{ role_name }}.conf.j2"
dest: "{{ data_folder }}/nginx/conf.d/{{ role_name }}.{{ base_domain }}.conf"
mode: "755"
notify: reload nginx