diff --git a/playbook.yml b/playbook.yml index 3f8b62a..ea942ac 100644 --- a/playbook.yml +++ b/playbook.yml @@ -9,6 +9,7 @@ - postgres - authelia - keycloak + - radarr vars_files: - vault/certs/{{ base_domain }}.yml - vault/passwords.yml diff --git a/roles/radarr/tasks/main.yml b/roles/radarr/tasks/main.yml new file mode 100644 index 0000000..28d1d06 --- /dev/null +++ b/roles/radarr/tasks/main.yml @@ -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 \ No newline at end of file